当我想使用file_get_contents()时超时


Time out when i want use file_get_contents()

我想从另一个网站读取文件的内容,但无法读取。我可以访问这两个主机。我想使用file_get_contents()函数。我需要在文件或文件夹的文件目录中更改什么?或者在我的PHP文件中?在此处输入链接描述

<?php$direct="http://nic.subz.ir/api/index.php";echo $direct;echo file_get_contents($direct);?>

在这里写下你的例子,并对你得到的结果进行错误处理。如果权限有问题,那么您必须在请求中发送用户代理