<?php

 

// 关闭所有PHP错误报告

error_reporting(0);

 

// 报告简单的运行错误

error_reporting(E_ERROR | E_WARNING | E_PARSE);

error_reporting(7);

 

// 报告 E_NOTICE 也挺好 (报告未初始化的变量或者捕获变量名的错误拼写)

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

 

// 除了 E_NOTICE,报告其他所有错误

// 这是在 php.ini 里的默认设置

error_reporting(E_ALL ^ E_NOTICE);

 

// 报告所有 PHP 错误 (参见 changelog)

error_reporting(E_ALL);

 

// 报告所有 PHP 错误

error_reporting(-1);

 

// 和 error_reporting(E_ALL); 一样

ini_set('error_reporting', E_ALL);

相关文章:

  • 2021-12-07
  • 2022-01-04
  • 2021-06-19
  • 2021-10-01
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-11-22
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案