<span style="color:#454545"><span style="font-family:Tahoma">概述和基本配置参数 <span style="font-family:tahoma,helvetica,arial; font-size:14px; color:#454545; line-height:21px">配置CI:</span></span></span>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> application/config/config.php:14配置你的域名</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> application/config/database.php:40配置你数据库的相关参数</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 配置基于htaccess的重定向</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> RewriteEngine on</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> RewriteCond $1 !^(index.php|images|robots.txt)</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> RewriteRule ^(.*)$ /index.php/$1 [L]</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 任何除开 index.php,images, 和robots.txt 的 HTTP 请求都当成对 index.php 文件的请求。</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 增加 URL 后 缀</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> application/config/config.php:57 配置$config['url_suffix'] = ".html";</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 配置后带或不带后缀都可以访问</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 使用index.php的get方式访问控制类</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> application/config/config.php中:</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> $config['enable_query_strings'] = true;<br> $config['controller_trigger'] = 'c';<br> $config['function_trigger'] = 'm';</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 访问方式:index.php?c=controller&m=method</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> 自定义的简单的控制类</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> <?php</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> class Blog extends Controller {<!-- --></p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> </p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> function index()</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> {<!-- --></p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> echo 'Hello World!';</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left:0px; padding-right:0px; font-family:tahoma,helvetica,arial; color:rgb(69,69,69); font-size:14px; padding-top:0px"> }</p>
<p style="padding-bottom:0px; line-height:21px; margin:0px; padding-left |
|