Home  >  Article  >  Backend Development  >  不显示mysql异常提示

不显示mysql异常提示

WBOY
WBOYOriginal
2016-06-13 11:52:351116browse

不显示mysql错误提示
有10个checkbox。9个不打勾时,值为null,数据库就报错
------解决方案--------------------
加这两句试试,[email protected]

<br /><?php<br />ini_set('display_errors', 'off');<br />error_reporting(0);<br />?><br />

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

引用:
但测试的时候会显示mysql的错误提示,我不希望访问网页的用户都看到mysql的错误提示

修改php.ini
error_reporting: E_ALL & ~E_DEPRECATED 
display_errors:Off
这药方疗效是临时的,但看病得治根
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