php ini_set使用
Every once in a while I need to process a HUGE file. Though PHP probably isn't the most efficient way of processing the file, I'll usually use PHP because it makes coding the processing script much faster. To prevent the script from timing out, I need to increase the execution time of the specific processing script. Here's how I do it.
偶尔我需要处理一个巨大的文件。 尽管PHP可能不是处理文件的最有效方法,但我通常会使用PHP,因为它可以使处理脚本的编码速度更快。 为了防止脚本超时,我需要增加特定处理脚本的执行时间。 这是我的方法。
PHP (The PHP)
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
Place this at the top of your PHP script and let your script loose!
将其放在您PHP脚本的顶部,然后放开您的脚本!
翻译自: https://davidwalsh.name/increase-php-script-execution-time-limit-ini_set
php ini_set使用