我想從另一個網站讀取文件的內容,但無法讀取它。 我可以訪問這兩個主機。 我想用file_get_contents()
函數。我需要在文件或文件夾的文件目錄中進行更改?或在我的PHP文件? enter link description here超時時我想要使用file_get_contents()
<?php
$direct="http://nic.subz.ir/api/index.php";
echo $direct;
echo file_get_contents($direct);
?>
請提供您正在訪問的代碼和示例鏈接。您是否無法使用file_get_contents()獲取數據; ? –
是的。我無法訪問數據[code] $ direct =「http://nic.subz.ir/api/index.php」; echo $ direct; echo file_get_contents($ direct); [/ code] http://services.khazrait.ir/feeds/te.php –