星期一, 10月 03, 2016

[php] Fatal error: Maximum execution time of 30 seconds exceeded 超過最長執行時間錯誤

今天寫批次計算演算法時,
發生了此錯誤 Fatal error: Maximum execution time of 30 seconds exceeded
因為預設php是30秒,所以爆開了。
可以簡單為單一執行的程式加入set_time_limit

set_time_limit(0) //則是無上限

沒事不要設定全域的執行時間:D ,想不開可以在php.ini檔設定。
可以找到max_execution_time的設定屬性

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails