[Đã sửa Error] Gọi hàm không xác định wp() trong wp-blog-header.php

O lôi đã xuất hiện với tôi trên một số blog WordPress sau khi chúng được chuyển từ máy chủ này sang máy chủ khác và có đã chỉnh sửa tập tin wp-config.php. 'Call to undefined function wp() in wp-blog-header.php".

Nguyên nhân của lỗi: – Có vẻ như tập tin wp-config.php nó mất dòng sau khi được chỉnh sửa. Cụ thể, tất cả mã php xuất hiện trên một dòng. Tôi không biết nguyên nhân chính xác là gì. Có thể là sự cố trình chỉnh sửa tệp php.

[Đã sửa Error] Call to undefined function wp() in wp-blog-header.php

Giải pháp: Sao chép & Thay thế vào một tệp mới wp-config.php trong đó để đặt cơ sở dữ liệu, cơ sở dữ liệu người dùng, thẻ và tiền tố của bạn.

<?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'); 
?>

Lỗi đã biến mất sau bản cập nhật này trong tệp wp-config.php al WordPress.

Là người yêu công nghệ, tôi rất vui được viết tại StealthSettings.com từ năm 2006. Tôi có kinh nghiệm đa dạng với các hệ điều hành: macOS, Windows và Linux, cũng như trong các ngôn ngữ lập trình và nền tảng blogging (WordPress) và cửa hàng trực tuyến (WooCommerce, Magento, PrestaShop).

Làm thế nào để » WordPress » [Đã sửa Error] Gọi hàm không xác định wp() trong wp-blog-header.php
Để lại một bình luận