Wp-config 错误处理
Wp-config error handling
有人告诉我将这段代码添加到我的 wp-config 文件中,但是当我这样做时 php 出现语法错误,我不确定如何修复它。
我应该在 wp-config.php 文件中的什么地方添加这段代码?
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
这是我插入上面代码的地方,倒数第二行出现错误:
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
必须
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
并且您不需要两次添加 WP_DEBUG
,只需将其值更改为 true
。
有人告诉我将这段代码添加到我的 wp-config 文件中,但是当我这样做时 php 出现语法错误,我不确定如何修复它。
我应该在 wp-config.php 文件中的什么地方添加这段代码?
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
这是我插入上面代码的地方,倒数第二行出现错误:
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
必须
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
并且您不需要两次添加 WP_DEBUG
,只需将其值更改为 true
。