• apache 新建虚拟机 +Zend Framework建立


    官方下载 Zend Framework

    1、LoadModule rewrite_module modules/mod_rewrite.so

    2、建立映射主机 c:\windows\system32\drivers\etc\hosts  加入 127.0.0.1 sugou

    3、建立虚拟主机

    Listen 8080 #监听端口
           <VirtualHost *:8080>
                ServerAdmin admin@sugou.local                           
                ServerName sugou      #域名 输入"http://sugou:8080/即可到达该目录
                DocumentRoot "e:/php/sugou/htdocs"   
                <Directory "e:/php/sugou/htdocs">
                     Options All
                     AllowOverride All

                     </Directory>
     php_value include_path ",;e:/php/sugou/include;e:/webservices/phpinstall/PEAR"
     php_value magic_quotes_gpc off
     php_value register_globals off
     php_value display_errors on
            </VirtualHost>    

    4、建立. .htaccess 文件

    cmd->cd 到index.php目录 键入命令 edit .htaccess 输入
               文件内容为
               RewriteEngine on
               RewriteRule !\.(js|ico|gif|bmp|jpg|png|css|xml|html|txt)$ index.php [NC]

     

    5、加载Zend Framework

          index.php

    <?php

          require_once("Zend/Loader.php"); //这里自动获取路径 总路径为 index_path+"Zend/Loader.php"

          Zend_Loader::loadClass('Zend_Controller_Front');  
          Zend_Loader::loadClass('Zend_Config_Ini');  
          Zend_Loader::loadClass('Zend_Registry');  
          Zend_Loader::loadClass("Zend_View");  
          Zend_Loader::loadClass('Zend_Db');
          echo "good information";

    ?>

  • 相关阅读:
    ipAllocate_and_linkState_hacking
    parseConf(配置文件解析器)
    Remember that ordinal parameters are 1-based!
    FetchType与FetchMode的区别
    Hibernate中Session.save()方法的返回值是什么
    CascadeType
    easyui隐藏列
    tree的所有节点都勾选上或者取消勾选
    jbpm角色审批
    Set与List之间转化
  • 原文地址:https://www.cnblogs.com/itgmhujia/p/1518832.html
Copyright © 2020-2023  润新知