Home  >  Article  >  php教程  >  PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建

PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建

WBOY
WBOYOriginal
2016-06-06 19:59:171296browse

PHP开发环境搭建 安装时,我们将使用 Apache、MySQL 和 PHP 各自的易装版本打成的名为 WAMP 的包。基于 Linux-Apache-MySQL-PHP(LAMP)平台的声望,以平台的关键组件为中心构建了安装程序,从而开发出 WAMP,使 LAMP 更接近 Windows 用户。您可以通过使用 W

PHP开发环境搭建


安装时,我们将使用 Apache、MySQL 和 PHP 各自的易装版本打成的名为 WAMP 的包。基于 Linux-Apache-MySQL-PHP(LAMP)平台的声望,以平台的关键组件为中心构建了安装程序,从而开发出 WAMP,使 LAMP 更接近 Windows 用户。您可以通过使用 WAMP 系统托盘图标中简单的上下文菜单来停止、启动、重启服务以及装载模块到 Apache、MySQL 和 PHP 中。按照安装向导操作,安装将成为一项非常轻松的任务,并且您可以在安装完毕后从上下文菜单中直接访问配置文件。

可以从 WAMPServer.com 获取 WAMP。

 

IDE环境搭建

 


 

了解如何使用统称为 PHP Development Toolkit (PDT) 的另一组 Eclipse 插件开发 PHP 应用程序。我们还将再次了解 Java EE Edition 中的一些功能,这些功能也是 PDT 的一部分。

  • 可以从http://download.eclipse.org/tools/pdt/downloads/获取PDT
  • 可以从http://downloads-source.zend.com/pdt/all-in-one/获取带有debuger功能的PDT,推荐选择这个

具体安装方法可以参考:            

http://framework.zend.com/manual/en/zend.controller.html#zend.controller.quickstart,不过注意下载的时候请选择带有debuger功能的PDT。

ZEND FrameWork 开发环境搭建


可以从 Zend 网站(http://framework.zend.com/)获取 Zend 框架。下载压缩文件并完整地解压到您选择的目录中,并确保引用该目录的 HTTPD.CONF 指向都具有正确的路径。

具体修改方法:

在 WAMP 上下文菜单中选中 Apache 模块子菜单,然后确保激活 rewrite_module 模块并选中该模块,在名称的旁边会出现一个小三角。单击此菜单项,菜单就会消失,同时图标变为黄色,这表示 Apache 正在重启。选中 PHP 扩展子菜单激活 php_pdo 和 php_pdo_mysql。

有时,即使有了这么棒的菜单,您还是需要编辑一两个配置文件。在本例中,我们需要编辑 httpd.conf 文件来为 mod_rewrite 模块包含重写规则,并且为了使 Zend 框架生效添加一些指令,如下所示。
清单 1. Httpd.conf 文件

PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建RewriteEngine on
PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建RewriteLog 
"g:ZendFramework-0.1.2 ewrite.log"
PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建RewriteRule 
!.(js|ico|gif|jpg|png|css|php)$ /index.php
PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建
PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建php_value include_path 
".;g:ZendFramework-0.1.2library"
PHP Eclipse PDT ZEND FrameWork Windos下开发环境搭建

 

同时在php.ini里面添加Zend debuger,在任意空白的地方添加:

zend_extension_ts = "eclipseplugins文件目录/org.zend.php.debug.debugger.win32.x86_5.2.6.v20070507/resources/php5/ZendDebugger.dll"

重启Apache,就可以使用Eclipse->Debug中的PHP Web Page方式调试你的项目了

具体调试请参照:

http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger#Setup_php.ini

现在就可以着手工作了。

实现例子的话可以参考:http://framework.zend.com/manual/en/zend.controller.html#zend.controller.quickstart

关于ZEND FrameWork的开发手册:

http://framework.zend.com/manual/en/zend.controller.html#zend.controller.quickstart

关于ZEND FrameWork的推荐的网站或者教程:

http://akrabat.com/zend-framework-tutorial/

http://hades.phparch.com/ceres/public/article/index.php/art::zend_framework::tutorial/5

http://www.ibm.com/developerworks/cn/opensource/top-projects/php-resources.html

http://shiningray.cn/zend-framework-tutorial.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn