WINDOWS XP 下Zend Studio For Eclipse 和 Zend Framework 配置

本例中以假设你正确安装了ZEND STUDIO FOR ECLIPSE
1,安装WampServer
下载WAMPSERVER并安装,在本例中,安装在D:/wamp下。
2 安装Zend Framework
解压缩 Zend Framework 压缩包中 /library/ 至 D:/wamp/library ,记住,路径别搞错了。
3 开启支持rewrite module
编辑 httpd.conf。
- 编辑 D:/wamp/bin/apache/Apache2.2.10/conf/httpd.conf 文件。或
- 右击托盘里WampServer小图标 --> Apache --> httpd.conf
# LoadModule rewrite_module modules/mod_rewrite.so
去掉 '#',改为:
LoadModule rewrite_module modules/mod_rewrite.so
4 PHP library 设置
- 编辑 D:/wamp/bin/php/php5.2.7/php.ini,或
- 右击托盘里WampServer小图标 --> PHP --> php.ini
; Windows: "/path1;/path2"
; include_path = ".;c:/php/includes"
去掉 ';',并且加上Zend Framework 压缩包安装路径,改为:
; Windows: "/path1;/path2"
include_path = ".;c:/php/includes;d:/wamp/library;"


5 启动Zend Studio For Eclipse 并且新建项目
启动 Zend Studio for Eclipse
File --> New --> Zend Framework Project -> Project Name: test -> Finish
6 在Apache中加入新项目
单击托盘里WampServer小图标 --> Apache --> ALIAS目录 --> 添加一个ALIAS
输入url: test
输入项目地址:http:/localhost/test
(注,貌似这步可有可无,因为我后来我另建一个项目,并没有执行该步,仍然可以显示结果)

7 在浏览器输入http://localhost/test/ 或者http://localhost/test/html/index.php
前者的结果是输出三个目录application/,html/,library/
而后者如果在第四步出现错误的话,会出现以下错误:
Warning: require_once(Zend/Controller/Front.php) [function.require-once]: failed to

open stream: No such file or directory in ......
Fatal error: require_once() [function.require]: Failed opening required

'Zend/Controller/Front.php' (include_path='.;C:/php5/pear') in ......



写到这里,不得不长啸一声,当初我也是弄了很久,但是环境配置还是死活弄不出来,当时在GOOGLE

上找了很久终于找到了篇文章,我也是按照他的PHP library 设置来配置的,原文如下:

右击托盘里WampServer小图标 --> PHP --> php.ini
;include_path = ".;D:/Program Files/wamp/library"
去掉 ';',改为:
include_path = ".;D:/Program Files/wamp/library"


当初我就卡死在这个配置上了,因为在该配置中有两个“;include_path”,而该文章也没写清楚是

哪个~
后来又GOOGLE了很久,终于发现原来是改“Windows: ”底下那个路径~
还没完,那到底是怎么改的呢?我又GOOGLE了很久,终于找到了一篇文章;原文如下:


下载 ZF1.5后 ,我将 ZF下的library 文件改名成ZF放到 G:/AppServ/ZF下,并配置php.ini文件的

include_path为
; Windows: "/path1;/path2"
;include_path = ".;c:/php/includes;G:/AppServ/ZF;"


看到这里我终于顿悟,原来是加上Zend Framework 压缩包安装路径就可以了,于是修改如下:
include_path = ".;c:/php/includes;D:/wamp/library;"

满心欢喜,输入地址,结果还是出现了:
Warning: require_once(Zend/Controller/Front.php) [function.require-once]: failed to

open stream: No such file or directory in ......
Fatal error: require_once() [function.require]: Failed opening required

'Zend/Controller/Front.php' (include_path='.;C:/php5/pear') in ......

百思不得其解,就在我快要崩溃的时候(我已经整整弄了两个小时了),我突然发现,路径盘符默认的

是小写:include_path = ".;c:/php/includes; 那是不是我自己加的盘符也是小写的呢?抱着死马当活

马医的态度,路径改为:
include_path = ".;c:/php/includes;d:/wamp/library;"
在浏览器输入“http://localhost/test/html/index.php ”,回车......
"Hello,world!"
我当时差点哭了出来......

本人正在自学PHP,一切的一切都是通过GOOGLE(或baidu)+摸索而来的, 写下这篇文章只是为了纪

念我的又一次痛苦的配置经历(上次是ECLPSEPHP的浏览器问题),如果这篇文章能对你有一丁点的帮助

,本人很是高兴,若没有的话,就当是茶余饭后的一点笑料咯,并且感谢您的收看~

当然,我只是仅仅把路径配置好了,至于框架怎么用,估计又是一次漫长的旅程了......


参考资料:1.WAMP + Zend Framework + Zend Studio For Eclipse 开发环境搭建
http://blog.csdn.net/pcniuniu/archive/2008/12/23/3592361.aspx

2.讨教ZF配置问题
http://www.zfchina.org/bbs/thread-34-1-1.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值