当我想使用 file_get_contents() 时超时
Time out when i want use file_get_contents()
我想从另一个网站读取文件内容,但无法读取。
我可以访问这两个主机。
我想使用 file_get_contents()
函数。我需要在文件或文件夹的文件目录中更改什么?或者在我的 PHP 文件中?
enter link description here
<?php
$direct="http://nic.subz.ir/api/index.php";
echo $direct;
echo file_get_contents($direct);
?>
在这里写下你的例子,并给出你得到的错误。
如果是关于许可的事情,那么你必须在你的请求中发送用户代理
我想从另一个网站读取文件内容,但无法读取。
我可以访问这两个主机。
我想使用 file_get_contents()
函数。我需要在文件或文件夹的文件目录中更改什么?或者在我的 PHP 文件中?
enter link description here
<?php
$direct="http://nic.subz.ir/api/index.php";
echo $direct;
echo file_get_contents($direct);
?>
在这里写下你的例子,并给出你得到的错误。 如果是关于许可的事情,那么你必须在你的请求中发送用户代理