第一步
wp-includes/class-wp.php 165 行:
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';
修改为:
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'],'utf-8', 'GBK') : '';
第二步
wp-includes/class-wp.php 170 行:
list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );
修改为:
list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], 'utf-8','GBK') );