douyue1481
2016-11-11 20:01
浏览 123
已采纳

找不到类 - PHP服务器配置?

So I'm working from a laptop, and I'm developing a PHP application. Being allowed to work from home, I installed EasyPHP on the laptop so I can host the web application locally on the laptop and work even when not connected to the internet, and without the use for a VPN connection, and even for when I'm at work, no need to mess with FileZilla or whatever, everthing will be so much easier like that for me.

My problem is the following: from our dev server, at work, everything is good. I copied the whole code in my easyphp folder, and I make a duplicate of my database in my local MySQL server. Running the application on my work's dev server, everything is fine. But locally, I get the following error:

Fatal error: Class 'ConfigNamespace' not found in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\MyApplication\libs\config\ConfigParser.php on line 50

So my ConfigParser class calls a New ConfigNamespace() at line 50... The local server doesn't like it. The ConfigNamespace class sits next to the ConfigParser class, in the \libs\config folder. Why does t not work locally, but works on the dev server?

I am under the impression that the configuration of the servers are different, and that my local server decides to expect all the classes to be in the root folder... but it's not!

I've searched on the web but only found things regarding system classes being unreachable... nothing that really has anything to do with my problem.

Thanks,

图片转代码服务由CSDN问答提供 功能建议

所以我在笔记本电脑上工作,我正在开发一个PHP应用程序。 允许在家工作,我在笔记本电脑上安装了EasyPHP,这样我就可以在笔记本电脑上本地托管Web应用程序,即使没有连接到互联网也可以工作,而且不需要使用VPN连接,甚至在我使用时也是如此 在工作中,不需要乱用FileZilla或其他任何东西,对我来说这样会更容易。</ p>

我的问题如下:从我们的开发服务器,在工作中,一切都是 好。 我将整个代码复制到easyphp文件夹中,并在本地MySQL服务器中复制了我的数据库。 在我工作的开发服务器上运行应用程序,一切都很好。 但在本地,我收到以下错误:</ p>

致命错误:在C:\ Program Files(x86)\ EasyPHP-DevServer-14.1VC11 \ data中找不到类'ConfigNamespace' 第50行\ localweb \ MyApplication \ libs \ config \ ConfigParser.php </ code> </ p>

所以我的ConfigParser类在第50行调用一个新的ConfigNamespace()...本地服务器没有 不喜欢它。 ConfigNamespace类位于ConfigParser类的旁边,位于\ libs \ config文件夹中。 为什么不在本地工作,但在dev服务器上工作?</ p>

我的印象是服务器的配置不同,我的本地服务器决定期望所有的类 在根文件夹中...但它不是!</ p>

我在网上搜索过但只发现了系统类无法访问的内容......没有什么可以做的事情 我的问题。</ p>

谢谢,</ p> </ div>

1条回答 默认 最新

相关推荐 更多相似问题