PHP 脚本超时 [英] PHP script times out

查看:21
本文介绍了PHP 脚本超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此页面中的脚本:导出漂亮的列表永久链接和帖子标题

I am using the script from this page: Export list of pretty permalinks and post title

它用于导出 wordpress 帖子和永久链接列表.我的问题是我有超过 2000 个帖子,脚本没有得到执行.在另一个拥有近 1000 个帖子的博客上,此脚本运行良好.什么php.ini设置或其他需要修改?脚本在大约 3 秒后停止加载.我将 max_execution_time 提高到更高,但没有帮助.

it is for exporting list of wordpress posts and permalinks. the problem I have is that I have over 2000 posts and the script does not get get executed. On the other blog that has close to 1000 posts, this script works fine. What php.ini setting or else needs to be modified? The script stops loading after about 3 seconds. I raised max_execution_time to higher, but it is not helping.

推荐答案

可以通过 set_time_limit.您还可以使用以下内容提高脚本的允许内存使用量:ini_set('memory_limit','512M');

You can set the script execution time limit with set_time_limit. You can also raise the amount of allowed memory use for the script with something like this: ini_set('memory_limit','512M');

这篇关于PHP 脚本超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆