php zend framework框架配置(1)

zend framework框架开发的基本流程(1):
 ①在zend framew官网上下载zend framework库(这里是ZendFramework-1.12.3)
 ②创建zend framework工程
   在cmd中进入到zend framework库的 bin 目录下,通过命令zf.bat create project 项目全路径(D:/ MyProject)创建一个工程,其中MyProject就是工程名
 ③ 将创建好的工程文件MyProject导入到zend studio中,并将zend framework库中的library类库下的 Zend文件 拷贝到工程中的library文件中
 ④配置apache,使其支持 zf 框架
    在 php.ini 文件中开启 PDO 数据库支持(;extension=php_pdo_mysql.dll 、;extension=php_pdo.dll [去掉前面的分号即可])
    启用Apache的 rewrite模块,在httpd.conf 目录下配置 (#LoadModule rewrite_modulemodules/mod_rewrite.so [去掉#即可])
    将AllowOverride None 中None改成 All,需要改写以下三个地方:
      
<Directory "C:/AppServ/www">
    #
    # 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.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews ExecCGI

    #
    # 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

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

</Directory>
 
<Directory />
    Options FollowSymLinks ExecCGI Indexes
    AllowOverride All
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>
 
<Directory "C:/AppServ/www/cgi-bin">
    AllowOverride All
    Options None
    Order allow,deny
    Allow from all
</Directory>
 ⑤配置虚拟主机
   在httpd.conf 文件中启用Include conf/extra/httpd-vhosts.conf
   在httpd-vhosts.conf 文件中配置如下虚拟主机:
    
<VirtualHost *:80>
    DocumentRoot "C:/AppServ/www/MyProject/public"//网站项目工程根目录
    ServerName  www.MyProject.com //域名
    DirectoryIndex index.php   //首页面
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
</VirtualHost>
 
   在hosts文件中添加 DNS (127.0.0.1 www.MyProject.com)
 ⑥重启 apache ,在浏览器中输入 www.MyPriject.com 验证是否配置成功,出现如下信息说明配置成功
   
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值