dongren1011 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.

  • 写回答

1条回答 默认 最新

  • doujuan2688 2014-12-08 18:13
    关注

    It seems it wasn't accessible from public/lib, so I used composer to install it in vendor. That is all it has needed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探