安裝PHP程序(比如Discuz、wordpress等等)提示“include_path='.;c:\php5\pear'”錯誤,以下是Discuz的一個報錯。
Fatal error: require_once() [function.require]: Failed opening required './source/class/class_core.php' (include_path='.;c:\php5\pear') in D:\web\BBS\index.php on line 14
解決方法:
1.可能由於你沒有傳完整php程序,或者php程序中的某個文件損壞,可能會報這個錯誤。去官網重新下載文件,是虛擬空間的請用官網支持的FTP工具上傳php程序。
2.文件權限問題,可能文件或者文件夾權限設置錯誤引起的。
3.文件夾名含有中文,有時候中文文件夾名也可能引起這個錯誤,建議改成英文的。
4.修改php程序,這個方法我不推薦(因為有的php程序可能需要改很多很多)
5.修改php.ini配置文件。
; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" 改為: ; Windows: "\path1;\path2" include_path = "c:\php\includes"