PHP fopen 警告
$file = @fopen("http://ajax.htm","rb");
我在使用 fopen
时收到此错误,
Warning: fopen(xyz.htm): failed to open stream: HTTP request failed!
in /home/user/public_html/aaa/ttt.php on line 8
这可能是什么原因?
$file = @fopen("http://ajax.htm","rb");
I am getting this error while using fopen
Warning: fopen(xyz.htm): failed to open stream: HTTP request failed!
in /home/user/public_html/aaa/ttt.php on line 8
what could be the reason behind this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我要在这里冒险并建议问题出在 url 'http://ajax.htm '。
I am going to go out on a huge limb here and suggest the problem is the url, 'http://ajax.htm'.
来自文档:
编辑:
ajax.htm
不是有效的网址。from docs:
edit:
ajax.htm
is not a valid url.我认为这是你的问题
https://www.php.net/function.fopen
there is your problem i think
https://www.php.net/function.fopen