如何包含 Zend 框架? [英] How to include the Zend framework?

查看:29
本文介绍了如何包含 Zend 框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 windows 7wamp 上,我不知道把 zend 框架放在哪里,因为我知道我需要改变路径include_path 但我不知道它应该是什么.

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.

当我打开测试文件或任何包含 zend 文件的文件时出现此错误:

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

警告:require_once(PHPUnit/Framework.php)

Warning: require_once(PHPUnit/Framework.php)

[function.require-once]: 无法打开流: 中没有这样的文件或目录C:\wamp\www\zend\tests\TestHelper.php 第 26 行

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

致命错误:require_once() [function.require]:打开失败

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

必需的 'PHPUnit/Framework.php' (include_path='.;C:\php5\pear') 在C:\wamp\www\zend\tests\TestHelper.php 第 26 行

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

推荐答案

你可以把 zend 框架目录放在任何你喜欢的地方,没关系.通常我将它放在我所有项目共享的公共文件夹中.

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.

只要将 zend 框架 lib 目录的路径添加到包含路径中就对了.lib 目录之外的任何内容都是额外的东西,不应包含在您的应用程序中 - 这似乎是您的问题所在.

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.

这篇关于如何包含 Zend 框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆