Skip to content
Advertisement

Issue in file_get_contents(), it is working on the localhost but not working on the host server [closed]

JavaScript

I tested on the localhost it works fine which shows 29.88288 and 71.7381 while on the host server shows empty. I tried to use allow_url_open to 1.

Advertisement

Answer

On Host server fopen is disabled that’s why file_get_contents() function is not working on server . You can use the Curl to get the data .

To check the fopen create the phpinfo(); in test PHP and run test.php file

Thanks

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement