When using PHP5’s own file_ get_ Content method to get remote files (in my
There are similar call requirements in the automated test framework, and sometimes the file will appear_ get_ contents(): failed to open stream: HTTP request failed! This is a warning message.
The solution is to modify php.ini Let_ url_ Fopen is enabled and changed to allow_ url_ fopen = On
This can solve some people’s problems. Some people say that in China php.ini In, there are two options: allow_ url_ Fopen = on (indicates that the remote file can be opened through URL), user_ Agent = “PHP” (indicates which script is used to access the network. By default, there is a “;” Remove it.) Restart the server.
But some will still have this warning message. If you want to use the perfect solution, you still need to set it php.ini User in it_ Agent, PHP’s default user_ The agent is PHP, we changed it to Mozilla/4.0 (compatible; MSIE 6.0; Windows u> NT 5.0)_ agent=”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)”
- failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
- Unable to open thread: http request failed! (4 pesos, PHP 4)
- file_get_contents failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
- [Solved] remote: HTTP Basic: Access denied Authentication failed for ‘https://’
- file_get_Contents and fopen return false when requesting HTTPS address: Error content: SSL routes: ssl3_get_server_certificate:certificate verify failed
- [Solved] Wget: Unable to establish SSL connection
- Failed to execute ‘createObjectURL’ on ‘URL’
- How to Solve Git Warning: possible DNS spoofing detected
- Using Python HDFS module to operate Hadoop HDFS
- Server returned HTTP response code: 500 for URL xxxxxxxxxxxxx