So i have a problem that made me crazy :( when i use simplexml_load_file, curl or file_get in my local machine it works fine but when i moved on the server it doesn't work and i got the timeout error,
this is my simple code :
$res = simplexml_load_file(urlencode($url));
So please if someone has any idea i will be very appreciative :)
Your server has probably allow_url_fopen set to off. Edit the php.ini file, find the line
allow_url_fopen = Off
and change it to
allow_url_fopen = 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.