【发布时间】:2011-07-11 16:36:41
【问题描述】:
服务器:PHP 5.3
有问题的行:
file_get_contents(http://subdomain.domain.com/Api/id);
在http://subdomain.domain.com/Api/id 我有这个:
$newFeeds = new newsFeeds();
$newFeeds->function($newsFeedParseFile); //insertamos a memcachedb
从这里它不起作用
$redis = cacheFactory::get('redis');
$redis->addTolist("Info_{1_2_FS}", "InfoRedis");
我没有收到任何错误,只是没有添加到队列中。
当我复制地址http://subdomain.domain.com/Api/id并粘贴到地址栏中时,我得到了我想要的响应!
【问题讨论】:
-
代码准确吗?我看到语法错误:缺少引号。
-
该子域站点是否与运行执行 file_get_contents 的脚本的站点在同一台机器上提供服务。一些托管服务提供商有防火墙设置,可以防止机器通过 TCP 与自己通信。
标签: php queue redis file-get-contents