今天安裝最新版的Wordpress 3.5,安裝后訪問首頁卻發現一個錯誤:
Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in F:\wwwroot\index.php on line 17
Fatal error: require() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.;C:\php5\pear') in F:\wwwroot\index.php on line 17
文件是在的,說明是父路徑的問題,因為服務器設置的權限比較嚴格,所以“./”的相對路徑無法使用,解決的辦法只有修改代碼了:
文本編輯器打開index.php,找到第17行
找到
require('./wp-blog-header.php');
修改成
require('wp-blog-header.php');
這樣就ok了!