今天给朋友配置wamp的时候,刚刚搭建好,打开一个本地站就出现这个错误,
Maximum execution time of 30 seconds exceeded,今天把这个错误的解决方案总结一下:
简单总结一下解决办法:
报错一:内存超限,具体报错语句忘了,简单说一下解决办法。
利用循环分批导入;
每个循环内部开始处使用sleep(5);语句,做延迟执行,防止服务器内存同一时间占用过多,里面数字据情况修改;
每个循环内部结束地方使用 ob_flush();刷新输出缓冲
flush();将当前为止程序的所有输出发送到用户的浏览器
两者必须同时使用来刷新输出缓冲
报错二:30秒运行超时的错误(Maximum execution time of 30 seconds exceeded)
解决办法:
方法一,修改php.ini文件
max_execution_time = 30; Maximum execution time of each script, in seconds
把它设置成需要的值就可以了。如果设置成0的话,就是永不过期。
方法二,修改php执行文件
加上
set_time_limit(0);
?>
max_execution_time = 30; Maximum execution time of each script, in seconds
把它设置成需要的值就可以了。如果设置成0的话,就是永不过期。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function