1.php文件页面设置:
<?php //修改最大执行时间 <a href="https://www.baidu.com/s?wd=ini_set&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdPvnsn10LPHnvnvnYrA7h0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHfsnj04njc1" target="_blank" class="baidu-highlight">ini_set</a>('max_execution_time', '0'); //修改此次最大<a href="https://www.baidu.com/s?wd=%E8%BF%90%E8%A1%8C%E5%86%85%E5%AD%98&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdPvnsn10LPHnvnvnYrA7h0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHfsnj04njc1" target="_blank" class="baidu-highlight">运行内存</a> <a href="https://www.baidu.com/s?wd=ini_set&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdPvnsn10LPHnvnvnYrA7h0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHfsnj04njc1" target="_blank" class="baidu-highlight">ini_set</a>('memory_limit','128M'); /*** * * 代码块省略...... * * */ ?>
php.ini配置文件设置(具体值,根据需要设置):
max_execution_time = 60
memory_limit = 128M
注意:如果执行内存完全满足的话,就不需要设置了。具体设置,根据情况灵活设置。
以上就是PHP 设置代码的最长执行时间的详细内容,更多请关注二当家的素材网其它相关文章!
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群