php disable html errors

To disable HTML errors in PHP, you can follow these steps:

  1. Open the PHP configuration file: Locate and open the php.ini file. This file contains various settings for PHP.

  2. Find the html_errors directive: Look for the html_errors directive in the php.ini file. This directive controls whether PHP should display HTML error messages.

  3. Set the html_errors directive: By default, the html_errors directive is set to On, which means that HTML error messages will be displayed. To disable HTML errors, change the value of this directive to Off.

ini html_errors = Off

  1. Save the changes: Save the php.ini file after making the necessary changes.

  2. Restart the web server: Restart the web server for the changes to take effect. This will ensure that PHP picks up the updated php.ini file.

By following these steps, you can disable HTML errors in PHP.