Zend Framework 配置笔记

in 程序开发
Zend Framework 配置笔记

Zend Framework 配置笔记

此配置是在Window环境下,Apache2.0.54,PHP 版本为5.2.2 

1.程序结构目录如下:

application/
controllers/
IndexController.php
models/
views/
scripts/
index/
index.phtml
helpers/
filters/
library/ 
public/
index.php 
2.将下载的ZF中的library下的zend目录拷贝到程序的library中
3.配置apache 
3.1修改httpd.conf,在末尾加上:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName mylibrary
DocumentRoot C:\mylibrary
RewriteEngine On
RewriteCond %{REQUEST_URI} !^.*(\.html|\.css|\.pdf|\.ppt|\.chm|\.rar|\.zip|\.js|\.gif|\.png|\.jpg|\.jpeg)$
RewriteRule ^(/.*)$ /index.php
</VirtualHost>
注意 DocumentRoot 中的路径不能包含空格,否则apache无法启动
3.2 开启LoadModule rewrite_module modules/mod_rewrite.so 
 
3.3 修改C盘system32下的hosts ,添加下面一句:
 127.0.0.1	mylibrary
 4.最后可以通过http://mylibrary访问。
0 Comments

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>