zend core 2.5 整合ZF进行开发-安装篇

Zend core默认的apache安装后,不支持ZF,需要重新配置apache和php步骤如下:

1.启用Apache的mod_rewrite模块.

2.在documentRoot下放如下.htacess文件(主要用于测试):

RewriteEngine on
RewriteCond %{scrīpt_FILENAME} !-f
RewriteCond %{scrīpt_FILENAME} !-d
RewriteRule ^(.*)$ index.php

3.让.htaccess生效.(这点很多人没注意),我的做法把httpd.conf里面的"Options"指令

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
#
http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options FollowSymLinks
AllowOverride All

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All(在默认安装下,这个是“none”)

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from All

4.测试下.htaccess是否可以用 打开本地的http://localhost/ 随便打入http://localhost/33 看会不会转到http://localhost/ 如果不会说明你的.htaccess没有生效.

5.下载Zend Framework http://framework.zend.com/download,放ZF到指定位置

6 在php.ini里面设置ZF的位置,另外,Zend Core默认下,PHP报错是关闭的,我们主要是用来测试,所以这个要打开

你可能感兴趣的:(linux)