用于 Eclipse PDT 的 Zend 框架插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3085030/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:50:25  来源:igfitidea点击:

Zend Framework Plugin for Eclipse PDT

phpeclipsezend-frameworkeclipse-pdt

提问by user224645

I have eclipse PDT IDE version 1.2.0 installed. I have used it together with Dojo to develop very interesting Ajax applications. Now i want to enable the Zend framework within my eclipse IDE. How can i do this. After some googling, i have tried the following.

我安装了 Eclipse PDT IDE 1.2.0 版。我已经将它与 Dojo 一起使用来开发非常有趣的 Ajax 应用程序。现在我想在我的 Eclipse IDE 中启用 Zend 框架。我怎样才能做到这一点。经过一些谷歌搜索后,我尝试了以下方法。

1.) downloaded the Zend framework and unzipped to my C directory. 2.) added the following path in my php.ini file

1.) 下载 Zend 框架并解压到我的 C 目录。2.) 在我的 php.ini 文件中添加了以下路径

include_path = ".;C:\ZendFramework-1.10.5\library"

include_path = ".;C:\ZendFramework-1.10.5\library"

3.) changed the following line in the httpd.conf file in Apache to support .htaccess files

3.) 更改 Apache 中 httpd.conf 文件中的以下行以支持 .htaccess 文件

AllowOverride None to AllowOverride All

AllowOverride None 到 AllowOverride All

Restart Apache once and tested to see if this had any effect. I tested by trying to create a new PHP project and take a look at the structure of the project files.

重新启动 Apache 一次并进行测试以查看这是否有任何影响。我通过尝试创建一个新的 PHP 项目并查看项目文件的结构来进行测试。

The question is

问题是

1.) how can i include zend framework to an already existing eclipse pdt ide.

1.) 如何将 zend 框架包含到已经存在的 eclipse pdt ide 中。

2.) is there a plugin that can be added directly or can i use the add software capabilities of eclipse. If yes, what URL do i have to supply for software download

2.) 有没有插件可以直接添加或者我可以使用eclipse的添加软件功能。如果是,我必须提供什么 URL 才能下载软件

3.) finally, how do i test to make sure that the zend framework has been properly installed

3.) 最后,我如何测试以确保已正确安装 zend 框架

thanks for your help

感谢您的帮助

回答by Tomá? Fejfar

I suggest setting ZF path as library for your ide (Preferences > PHP > PHP Libraries > New > Add External Folder). And then for your project: RMB on project in sidebar > Properties > PHP Include Path > Add Library > User Library > select your library.

我建议将 ZF 路径设置为您的 ide 的库(首选项 > PHP > PHP 库 > 新建 > 添加外部文件夹)。然后对于您的项目:边栏中的项目上的人民币 > 属性 > PHP 包含路径 > 添加库 > 用户库 > 选择您的库。

I develop full time in Zend and this way is the best so far ;) (if you don't want to pay for ZendStudio ;)

我在 Zend 中全职开发,这种方式是迄今为止最好的 ;) (如果您不想为 ZendStudio 付费 ;)

回答by Robert Elwell

1) You can add references to the Zend Framework to any project in Eclipse by configuring its include path.

1) 您可以通过配置其包含路径,向 Eclipse 中的任何项目添加对 Zend Framework 的引用。

2) I'd say that most of the custom Zend support built for Eclipse has gone into Zend Studio For Eclipse, from the folks at Zend. Of course, that costs money, but you're able to download and play with it for free. Of course, once you have ZF in your project's include path, it will show up in code completion and documentation snippets, etc.

2) 我想说的是,大部分为 Eclipse 构建的自定义 Zend 支持已经进入 Zend Studio For Eclipse,来自 Zend 的人。当然,这需要花钱,但您可以免费下载并使用它。当然,一旦在项目的包含路径中有 ZF,它就会显示在代码完成和文档片段等中。

3) Try using require_once on something in the Zend Framework folder. If you get an error, your PHP include path isn't properly set up.

3) 尝试对 Zend Framework 文件夹中的某些内容使用 require_once。如果出现错误,则说明您的 PHP 包含路径设置不正确。