使用@fopen时出错 [英] error on using @fopen

查看:91
本文介绍了使用@fopen时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用@fopen以"rb"模式打开文件.我在这里打开的文件没有错误运行,但是如果我使用@fopen打开该文件,则显示错误.

I'm using @fopen to open a file in "rb" mode. the file that im opening here is running with no errors but if i open that file using @fopen then it is giving error.

代码是这样的---

$file = @fopen("xyz.com","rb") or $flag=1;

if($flag==1)
{
    mail($to, $subject, $message, $from);
    die();
}

有时它打开时没有发送任何错误邮件,但有时它开始发出这么多错误邮件.

sometimes it opens up without sending any error mail but sometimes it starts giving so many error mails.

在没有任何错误邮件的情况下打开此URL的解决方案是什么?请帮助!

what is the solution to open this url without having any error mail? plz help!!

推荐答案

尝试使用

file_get_contents(); 

函数而不是fopen().

function instead of fopen().

这篇关于使用@fopen时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆