注意是 https 不是 http ,别问为什么要用 https ,不在此贴讨论范围。
试过阿里云服务器和国外的 vultr 服务器,结果一样。
wget https://tieba.baidu.com
--2016-08-12 09:50:44-- https://tieba.baidu.com/
Resolving tieba.baidu.com... 180.97.104.41, 180.97.104.40
Connecting to tieba.baidu.com|180.97.104.41|:443...
结果是:
failed: Connection timed out
---------------------------------------
$result = file_get_contents('https://tieba.baidu.com');
这个 php 命令在我电脑上(windows+apache+php)成功,但在服务器上(centos6+apache+php)就是:
failed to open stream: Connection timed out
-----------------------------------
这是怎么回事呢?
试过阿里云服务器和国外的 vultr 服务器,结果一样。
wget https://tieba.baidu.com
--2016-08-12 09:50:44-- https://tieba.baidu.com/
Resolving tieba.baidu.com... 180.97.104.41, 180.97.104.40
Connecting to tieba.baidu.com|180.97.104.41|:443...
结果是:
failed: Connection timed out
---------------------------------------
$result = file_get_contents('https://tieba.baidu.com');
这个 php 命令在我电脑上(windows+apache+php)成功,但在服务器上(centos6+apache+php)就是:
failed to open stream: Connection timed out
-----------------------------------
这是怎么回事呢?