【问题标题】:Wp-config error handlingwp-config 错误处理
【发布时间】:2016-04-27 11:17:01
【问题描述】:

有人告诉我将此代码添加到我的 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__) . '/');

【问题讨论】:

    标签: php wordpress error-handling configuration


    【解决方案1】:

    必须

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

    而且你不需要添加WP_DEBUG twise,只需将其值更改为true

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-19
      • 1970-01-01
      • 2018-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-18
      • 2015-08-11
      相关资源
      最近更新 更多