简体   繁体   中英

file_get_contents dont work?

Server: PHP 5.3

The line in question:

file_get_contents(http://subdomain.domain.com/Api/id);

In http://subdomain.domain.com/Api/id I have this:

$newFeeds = new newsFeeds();
$newFeeds->function($newsFeedParseFile); //insertamos a memcachedb

and from here it doesn't work

$redis = cacheFactory::get('redis');    
$redis->addTolist("Info_{1_2_FS}", "InfoRedis");

I don't get any error, it just doesn't add to queue.

The wear things is when I copy the address http://subdomain.domain.com/Api/id and paste in the address bar I get the response that I want!

Verify in your php.ini if "allow_url_fopen" is On, if isn't change it to On.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM