开发者

Will php error reporting also display mysql errors?

开发者 https://www.devze.com 2023-01-26 14:50 出处:网络
I have this in my PHP code, which outputs MySql errors: $res = mysql_query($sql) or die(mysql_error());

I have this in my PHP code, which outputs MySql errors:

$res = mysql_query($sql) or die(mysql_error());

Will disabling 开发者_JAVA百科error reporting in php.ini cause these mysql errors not to show as well?


No, because die() prints the string and exit. This has nothing to do with *error_reporting*. For production environment you should think about a logger to write such message to a file or somewhere, instead of printing it.

0

精彩评论

暂无评论...
验证码 换一张
取 消