在 D:\wamp\www\z 中打开所需的“System.php”(include_path='.;C:\php\pear')失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27023454/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed opening required 'System.php' (include_path='.;C:\php\pear') in D:\wamp\www\z
提问by Ashu
I am bit new in php. I Downloaded a wordpress and installed in my wamp. But the below error encountered.
我对 php 有点陌生。我下载了一个 wordpress 并安装在我的 wamp 中。但是遇到了下面的错误。
Fatal error: require_once() [function.require]: Failed opening required 'System.php'
(include_path='.;C:\php\pear') in D:\wamp\www\fundwe\...
My Wamp is not installed in C drive. Instead it is in D Drive. Please please help me
我的 Wamp 没有安装在 C 盘。相反,它在 D 盘中。请帮帮我
回答by RiggsFolly
In WAMPServer, the include_path
is commented out, so you are getting the default version which is why it is pointing to include_path='.;C:\php\pear'
在 WAMPServer 中,include_path
被注释掉,因此您获得的是默认版本,这就是它指向的原因include_path='.;C:\php\pear'
So you could try editing the php.ini file, using the wampserver menus to make sure you edit the correct file (\wamp\bin\php\{phpVersion}\bin\phpForApache.ini)
所以你可以尝试编辑 php.ini 文件,使用 wampserver 菜单来确保你编辑了正确的文件 (\wamp\bin\php\{phpVersion}\bin\phpForApache.ini)
wampmanager->PHP->php.ini
And add a proper include path in place of the commented out one in there already
并添加一个适当的包含路径来代替已经注释掉的路径
include_path=".;d:\wamp\bin\php\{yourPHPVersion}\pear"
Although I have an idea this is not related to PEAR at all.
虽然我有一个想法,这与 PEAR 完全无关。
You would probably be better of creating a Virtual Host for the Wordpress site to run in, then it will probably find the file its looking for in the theme folder.
您可能最好为 Wordpress 站点创建一个虚拟主机来运行,然后它可能会在主题文件夹中找到它要查找的文件。