wordpress錯(cuò)誤require(wp-blog-header.php) [function.require]的解決辦法

2013-04-25 21:41:24來源:西部e網(wǎng)作者:

今天安裝最新版的Wordpress 3.5,安裝后訪問首頁卻發(fā)現(xiàn)一個(gè)錯(cuò)誤:

今天安裝最新版的Wordpress 3.5,安裝后訪問首頁卻發(fā)現(xiàn)一個(gè)錯(cuò)誤:

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

文件是在的,說明是父路徑的問題,因?yàn)榉⻊?wù)器設(shè)置的權(quán)限比較嚴(yán)格,所以“./”的相對路徑無法使用,解決的辦法只有修改代碼了:

文本編輯器打開index.php,找到第17行

找到
require('./wp-blog-header.php');
修改成

require('wp-blog-header.php');

這樣就ok了!

關(guān)鍵詞:wordpress

贊助商鏈接: