2

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

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

Will disabling error reporting in php.ini cause these mysql errors not to show as well?

1
  • 2
    How about trying it out? Could very well be faster than asking here. Commented Nov 20, 2010 at 0:21

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.