[固定的 Error] 調用 wp-blog-header.php 中的未定義函數 wp()

O 錯誤 在幾個博客上出現在我面前 WordPress 在他們從一台服務器移動到另一台服務器並擁有 編輯文件 wp-config.php。 “Call to undefined function wp() in wp-blog-header.php“。

錯誤原因: – 似乎文件 wp-config.php文件 它在編輯後丟失了它的線條。 具體來說,所有 php 代碼都出現在一行中。 我不知道確切的原因是什麼。 可能是 php 文件編輯器問題。

[固定的 Error] Call to undefined function wp() in wp-blog-header.php

:複製並替換為新文件 wp-config.php 在其中設置您的數據庫、用戶數據庫、密碼和前綴。

<?php 
// ** MySQL settings - You can get this info from your web host ** // 
/** The name of the database for WordPress */ 
define('DB_NAME', 'putyourdbnamehere');

/** MySQL database username */ 
define('DB_USER', 'usernamehere');

/** MySQL database password */ 
define('DB_PASSWORD', 'yourpasswordhere');

/** MySQL hostname */ 
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */ 
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */ 
define('DB_COLLATE', '');

define('AUTH_KEY', 'put your unique phrase here'); 
define('SECURE_AUTH_KEY', 'put your unique phrase here'); 
define('LOGGED_IN_KEY', 'put your unique phrase here'); 
define('NONCE_KEY', 'put your unique phrase here'); 
$table_prefix  = 'wp_';

define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */

/** WordPress absolute path to the WordPress directory. */ 
if ( !defined('ABSPATH') ) 
    define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */ 
require_once(ABSPATH . 'wp-settings.php'); 
?>

文件中的此更新後錯誤消失 wp-config.php al WordPress.

對技術充滿熱情,我很高興寫 StealthSettings.com 自 2006 年起。我在作業系統方面擁有豐富的經驗: macOS, Windows 對 Linux,而且還包括程式語言和部落格平台(WordPress)和線上商店(WooCommerce、Magento、PrestaShop)。

如何 » WordPress » [固定的 Error] 調用 wp-blog-header.php 中的未定義函數 wp()
發表評論