插入wp-config.php文件中的以下代码将所有错误,通知和警告记录到wp-content目录中名为debug.log的文件中.它还会隐藏错误,因此它们不会中断页面生成.
这个代码你必须要插入BEFORE / *这就是全部,停止编辑!快乐的博客. * /在wp-config.php文件中.
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define('SCRIPT_DEBUG', true);