gpt4 book ai didi

php - 定义 ('WP_DEBUG' ,真);不显示错误

转载 作者:可可西里 更新时间:2023-11-01 12:32:36 25 4
gpt4 key购买 nike

我在我的 wp-config 文件中启用了错误:

define('WP_DEBUG', true);

但是我有一个空白的白页。未列出任何错误。

最佳答案

插入 wp-config.php 文件的以下代码会将所有错误、通知和警告记录到 wp-content 目录中名为 debug.log 的文件中。它还会隐藏错误,这样它们就不会中断页面​​生成。

您必须在之前插入此代码/ 就这样,停止编辑!快乐的博客。 /在 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);

来源:https://wordpress.org/support/article/debugging-in-wordpress/

关于php - 定义 ('WP_DEBUG' ,真);不显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32266155/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com