Home  >  Article  >  Backend Development  >  file_get_contents函数可否不报错

file_get_contents函数可否不报错

WBOY
WBOYOriginal
2016-06-13 11:45:251002browse

file_get_contents函数能否不报错

本帖最后由 u013541063 于 2014-01-24 12:17:28 编辑
<br />$lyfile = 'E:\key\Logs\lykey.Txt';<br />$bbb = file_get_contents($lyfile);



当没有lykey.Txt这个文件时php就报错,能否不报错就当$bbb = '';(等于空呢)


麻烦知道的大大直接给完整代码,谢谢了
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