How to include the Zend framework?

纵饮孤独 提交于 2019-12-23 05:11:53

问题


I'm on windows 7 with wamp and I don't know where to put the zend framework, as I know I need to change the path of the include_path but I don't know what should that be to work.

I get this error when I open the test files or anything withing the zend files:

Warning: require_once(PHPUnit/Framework.php)

[function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\zend\tests\TestHelper.php on line 26

Fatal error: require_once() [function.require]: Failed opening

required 'PHPUnit/Framework.php' (include_path='.;C:\php5\pear') in C:\wamp\www\zend\tests\TestHelper.php on line 26


回答1:


You can place the zend framework directory anywhere you like, it doesn't matter. Generally I place it in a common folder shared by all my projects.

As long as you add the path to the zend framework lib directory to your include path you are right. Anything outside the lib directory is for extra stuff and should not be included in your application - this seems to be where your problem lies.




回答2:


It's failing to find PHPUnit/Framework.php, so it does not appear to be a Zend Framework issue. The question is: Where you have your PHPUnit files installed?

I see an include path that contains C:\php5\pear. Is the PHPUnit library there?




回答3:


I'm using Zend Server Community Edition it's set include paths and has installed required pear packages by default.



来源:https://stackoverflow.com/questions/3463057/how-to-include-the-zend-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!