嗨下面的代码在我的托管中工作正常,但不在我的本地主机中。File_get_contents在Localhost中返回空字符串
<?php
$hi = file_get_contents("https://ojooo.com");
echo $hi;
?>
但奇怪的是下面的代码在我的本地主机工程。
<?php
$hi = file_get_contents("https://yahoo.com");
echo $hi;
?>
我真的很困惑为什么代码在我的主机,但不是在我的localhost.Some一个请指导我什么是wrong.thanks工作。
我,当我使用curl访问本地主机页面甚至有这个问题。 – atwellpub