2016-01-21 70 views
1

我被告知将此代码添加到我的wp-config文件中,但是当我执行php时出现语法错误,并且我不确定如何去修复它。Wp-config错误handeling

我应该在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__) . '/'); 

回答

0

必须

define('WP_DEBUG', true); 
define('WP_DEBUG_DISPLAY', false); 
define('WP_DEBUG_LOG', true); 

而且你也不需要逐个添加WP_DEBUG,仅将其值更改为true