我想从另一个网站读取文件的内容,但无法读取它。 我可以访问这两个主机。 我想用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 –