O 错误 这在几个博客上出现在我面前 WordPress 从一台服务器移动到另一个 编辑wp-config.php文件.
致命 error:调用未定义函数wp() /主页/用户/的public_html / WP博客的header.php线18上
错误原因: -看起来像文件 WP-config.php文件 失去了正在编辑的行。 具体而言,所有的PHP代码出现在一行上。 我不知道确切的原因是什么。 大概是因为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');
?>
致命 error:在/ home /中调用未定义的函数wp()用户/的public_html /可湿性粉剂博客的header.php线18