Home  >  Article  >  Backend Development  >  How to force display of error messages in PHP

How to force display of error messages in PHP

WBOY
WBOYOriginal
2016-07-25 08:55:59869browse
  1. error_reporting(E_ALL);

  2. ini_set('display_errors', '1');

  3. //Output error information to a text file

  4. ini_set( 'error_log', dirname(__FILE__) . '/error_log.txt');

Copy code

For more information about error_reporting, please refer to: Usage reference of error_reporting() function in php Teach you how to enable PHP’s error_log Usage example of php error_reporting() function (error capture) The difference between display_errors and log_errors in php php error_reporting() sets the error reporting level Learn how to use error_reporting



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