zoukankan      html  css  js  c++  java
  • CI框架搭建

    CI 框架等移植到不同等环境十分方便,只要改很少等配置:

    1.修改config.php 文件(修改这一个文件就可以跑通了):

    $config['base_url']    = 'http://127.0.0.1/bill/';

    2.使apache支持 rewrite 模块(去掉index.php)

    sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

    修改配置 /etc/apache2/sites-available/default

        ServerAdmin webmaster@localhost
    
        RewriteEngine On
        RewriteOptions Inherit
    
        DocumentRoot /var/www
        <Directory />
            Options FollowSymLinks
            AllowOverride None
        </Directory>
        <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All 
            Order allow,deny
            allow from all
        </Directory>

    3.添加 rewrite 规则 (网站根目录的 .htaccess 文件)

    RewriteEngine on                                                                                                                 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond $1 !^(index.php|images|robots.txt)
    RewriteRule ^(.*)$ /bill/index.php/$1 [L] 
  • 相关阅读:
    OPC UA认识汇总
    linux内核铁三角-进程(任务)调度
    nginx配置文件
    git和coding的使用
    php处理mysql的结果集
    php中self和$this还有parent的区别
    Mysql练习题
    SEO优化
    css3 旋转 八仙桌
    laravel笔记
  • 原文地址:https://www.cnblogs.com/xiangzi888/p/3485113.html
Copyright © 2011-2022 走看看