长时间运行PHP脚本问题

长时间运行PHP脚本问题

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

问题描述



我有一个PHP脚本可以运行很长时间(正如它所设想的那样)。基本上它搜索谷歌和雅虎,然后我正在做一些处理。它有时运行得很好,有时也很有效。


就像在Firefox运行时一样,它给我下载对话框下载我正在运行的相同脚本,在Konqueror中显示连接取而代之的是打破了localhost。


我确定脚本没有任何问题,因为它有时会显示正确的输出..但是它与时间有关...

所以我能做些什么才能避免这种情况...

我也用过sleep()....或者...... flush()但是还没有好运..


问候,

RP

Hi,
I''ve one PHP script which runs for long time(as it suppose to). Basically it searches on Google and Yahoo and then i''m doing some processing. It runs perfectly sometimes and sometimes it dosent.

Like in Firefox when it dosent run it gives me download dialog box to download the same script i''m running and in Konqueror it shows connection broken to localhost instead.

I''m sure that there is nothing wrong with the script as it shows correct output sometimes.. but there something to do with the time its taking..
so what can i do to avoid this...
I''ve also used sleep().... or... flush() but still not much luck..

Regards,
RP

推荐答案



不太了解问题,但有你试过?




好​​吧,我的PHP脚本中有这一行。并且我的脚本有时会运行一个多小时,但是当它显示错误时,它会显示错误与主机连接已断开....就像前一段时间我的互联网停机了5-10分钟。所以我得到了这个网站的相同错误(bytes.com)...


问候,

RP

well yeah i''ve that line in my PHP script. and my script runs for more than an hour sometimes but when it dosent it shows error "connection to host is broken".... Like a while ago my internet was down for 5-10 min. so i was getting same error for this site(bytes.com)...

Regards,
RP




一小时?!


什么!#*

OVER AN HOUR?!

What the !#*


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

08-15 08:43