2014-12-07 21:48
浏览 84

PHP ZF2:找不到类

I've got a problem with finding a class. I am using ZF2, and I have ElephantIO under \public\lib. Netbeans finds the class I am trying to use, and it points me to it when I type "use ElephantIO\Engine\SocketIO\Version0X;"...

However when I run the code in my localhost, it returns Class 'ElephantIO\Engine\SocketIO\Version0X' not found in /Applications/MA....

I am calling it in

new Version0X('http://localhost:5555');

I can also access it using NetBeans' Open declaration.

What seems to be the problem?

More: I tried adding a require_once for the Version0X php file and it did work, but then it told me that another class which extends Version0X isn't found, so I guessed this will be too much trouble to add all files.

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

我遇到了查找课程的问题。 我正在使用ZF2,我在\ public \ lib下有ElephantIO。 Netbeans找到了我正在尝试使用的类,当我输入“使用ElephantIO \ Engine \ SocketIO \ Version0X;”...

但是当我运行代码时它会指向我 在我的localhost中,它返回类'ElephantIO \ Engine \ SocketIO \ Version0X'找不到/Applications/MA....


我在中调用它 \ n

  new Version0X('http:// localhost:5555'); 

我也可以使用NetBeans的Open声明来访问它。< / p>


更多: 我尝试为Version0X php文件添加一个require_once但它确实有效,但后来告诉了它 我找不到另一个扩展了Version0X的类,所以我猜想添加所有文件会很麻烦。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题