I'm testing file_get_contents on my WAMP laptop (Windows Vista Home), and tried to use it to get the contents of www.google.com, scripts are as below: However I got the following errors: The allow_url_fopen is on in the php.ini, and tried change the set_time_limit to bigger or less, still the same errors. What's wrong with the php.ini settings or wrong with the script?
check the maximum_execution_time in your php.ini but also check the timeout value for your apache web server configuration file
open pnp.ini search max_execution_time set its value to anything in seconds if you want script to run for 30 min then set max_execution_time=1800
I don't think max_execution_time is the problem, since I tried the set_time_limit function and set the time limit to different values. And also I don't think we need 2 minutes to connect to google. I tried several other urls, and still the same problem. Expert please help.
file_get_contents(), requires its dependencies to be enabled, so it can function correctly, theirfore ensure that you have internet access.