Why can't the php project obtain the remote webpage content on the server? PHP & nbsp; the project runs locally. you can use CURL & nbsp; to obtain the content of a remote webpage, but the content of a remote webpage cannot be obtained on the server. why, where can I modify the problem? The server is a mac & nbs php Project. why cannot I obtain the content of a remote webpage on the server?
The PHP project runs locally. you can use CURL to obtain the content of a remote webpage, but you cannot obtain the content of the remote webpage on the server. why? where is the problem, how can I modify it?
The server is a mac OS server and the environment is already in the system.
------ Solution --------------------
Maybe the CURL module of the server is not installed
------ Solution --------------------
Phpinfo: Check whether the cURL module is installed.
------ Solution --------------------
What's wrong? post it and check it out.
------ Solution --------------------
1. check the php error_log
2. check whether the network is accessible
3. check security policies between servers, such as iptables.
------ Solution --------------------
This problem is easily resolved in the not-online phase, that is, if remote server access is not yet online and hosts is required, then the machine executing curl must also have hosts.
------ Solution --------------------
Two cases:
1. check whether CURL is enabled
2. check whether the server can access the Internet.
Ouba
------ Solution --------------------
Yes,
------ Solution --------------------
From the log, it seems that the php environment on the server is faulty...
Disable Zend-related modules and try again.
------ Solution --------------------
Reference:
The following error occurs in the log:
[Fri Feb 10 14:18:29 2012] [error] [client 10.0.1.165] PHP Fatal error: Uncaught exception 'zend _ Controller_Dispatcher_Exception 'with message 'invalid controller specified (favicon. ic ......
Try a basic web page. This error cannot be seen. Key error messages are not displayed.
------ Solution --------------------
File_get_contents.