phpWhen certain operations are completed, it may take a long time to execute. This requires setting its execution time, otherwise the server will stop execution after the execution time times out and the page will be blank. Two solutions are recommended below:
1.php file page settings:
ini_set('max_execution_time', '0'); //修改此次最大运行内存 ini_set('memory_limit','128M'); /*** * * 代码块省略...... * * */ ?>
php.iniConfiguration filesettings (specific values, set as needed):
max_execution_time = 60
memory_limit = 128M
##Note: If the execution memory is completely satisfied, then No need to set it up. Specific settings can be set flexibly according to the situation.The above is the detailed content of PHP sets the maximum execution time of code. For more information, please follow other related articles on the PHP Chinese website!