“Fatal error: Maximum execution time”

Google AD

“Fatal error: Maximum execution time of 60 seconds exceeded in …”

这种错误大多出现在一些执行时间比较久的程序,例如循环、读取、上传等等(瞎写凑字数)。

大多原因在于 PHP 环境的PHP.ini 里的 max_execution_time 的设置,30,60,90….,但是有时候我们需要更长的时间,几小时,几十小时,总不可能都在这儿修改,况且大多空间是不让你改的。

这样最简便的方法就是在程序头加上这样一句:

set_time_limit(0);

不限制执行时间,OK,问题就算解决了!

相关文章

  1. Fatal error: Call to undefined function: stripos()
  2. PHPlist Error:Database error 1146 Table ‘DBname.user_group’ doesn’t exist
  3. php代码出现错误分析详解
  4. php session tmp 路径错误
  5. Windows2k3配置PHP服务器环境

关于站长

姚迎迎,生于 1985年3月2日, 江苏大丰人士 。修行于福州大学软件学院

Taobao AD

Google 广告