2016-01-21 51 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