douweibiao8471 2015-02-05 23:32
浏览 82

Zend / loader.php没有错误,但Zen_Loader不会'loadClass

Hello all just starting out trying get info off the google analyitcs api and finished configuring the php.ini and requiring the Loader.php. while i got no error messages and all seemed well once i got to the loadClass it failed. this is what i have in the php.ini

include_path=".;C:\xampp\php\PEAR:.;C:\xampp\htdocs\gaDataGather\ZendGdata\library"

this is what i tested w/no issues or error messages:

require_once('ZendGdata/library/Zend/Loader.php');

Now am at this stage: require_once 'ZendGdata/library/Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_Query'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

At which point it fails and the error msgs are:

Warning: include_once(Zend\Gdata.php): failed to open stream: No such file or directory in C:\xampp\htdocs\gaDataGather\ZendGdata\library\Zend\Loader.php on line 134

Warning: include_once(): Failed opening 'Zend\Gdata.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gaDataGather\ZendGdata\library\Zend\Loader.php on line 134

Warning: require_once(Zend/Exception.php): failed to open stream: No such file or directory in C:\xampp\htdocs\gaDataGather\ZendGdata\library\Zend\Loader.php on line 86

Fatal error: require_once(): Failed opening required 'Zend/Exception.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gaDataGather\ZendGdata\library\Zend\Loader.php on line 86

I have my .php files & my ZenDGdata folder in the same dir.

Hope you can help. Thx D

  • 写回答

1条回答 默认 最新

  • donglvmang8638 2015-02-06 13:18
    关注

    This line:

    require_once 'ZendGdata/library/Zend/Loader.php'
    

    should be:

    require_once 'Zend/Loader.php'
    

    That will then generate an error, because your include path is not setup correctly. You can see from the include path shown in the error messages that it only includes PEAR, the ZF path you added is missing. Make sure you're setting the include path in the correct php.ini file (PHP usually has more than one), as this is the typical cause of this problem.

    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100