简体   繁体   中英

How I can hide php error details from end users

how I can hide php error details from end users I don't want the end users see my php error details

I modify on php.ini

display_errors = off

and I modify in .htaccess

php_flag display_errors off

and i restart Apache server but still the error display

I use xampp v3.2.4错误截图

Try putting following code at the start of your file to stop display error's in runtime

// Turn off all error reporting for your production environment
error_reporting(0);

You are not supposed to hide the error, you are supposed to fix it so it does not happen again. The message tells you that interior_image_name2 is missing from your table.

From what I can tell your SQL query throws an error, and at this point you application cannot continue because your expected result does not exist. You either fix your SQL, or you try/catch to see if you have an result before you attempt to work with it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM