Home  >  Article  >  Backend Development  >  die()函数如何不报错

die()函数如何不报错

WBOY
WBOYOriginal
2016-06-13 10:21:50806browse

die()函数怎么不报错
if(!file_exists("welcome.txt"))
{
die("file not found");
}
else
{
$file = fopen("welcome.txt","r");
}

理论上文件不存在,浏览器应该输出这样的错误消息:file not found
可为什么我的浏览器什么也没有输出?

------解决方案--------------------

探讨

为什么不存在也没有报错?
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn