嗨下面的代碼在我的託管中工作正常,但不在我的本地主機中。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