会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
IT鸟.NET记录
站长工具-查一把:http://www.ChaYiBa.Com
博客园
首页
新随笔
联系
管理
订阅
2010年10月31日
file_get_contents超时问题及解决方案
摘要: 经常会使用php中的file_get_contents()函数去抓取远程页面, 对方页面文件过大、对方页面反应时间太久或网络传输慢等原因都可能会导致file_get_contents()执行时间超过php的最大执行时间。而一 旦file_get_contents出错即会终止整个程序。测试用例<?phpini_set("max_execution_time", 2);$url = "http:...
阅读全文
posted @ 2010-10-31 00:00 IT鸟
阅读(1937)
评论(0)
推荐(0)
编辑
公告