123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="utf-8" lang="utf-8">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
- <title>CodeIgniter 是什么? - CodeIgniter 中文手册|用户手册|用户指南|Wiki文档</title>
- <link rel="shortcut icon" href="http://codeigniter.org.cn/user_guide/../images/design/favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" type="text/css" media="all" href="../userguide.css" />
- <link rel="search" href="http://codeigniter.org.cn/user_guide/../CodeIgniterSearch.xml" type="application/opensearchdescription+xml" title="CodeIgniter 搜索"/>
- <link rel="canonical" href="http://codeigniter.org.cn/user_guide/overview/at_a_glance.html" />
- <script type="text/javascript" src="../nav/mootools.js-ver=20130324.js"></script>
- <script type="text/javascript" src="../nav/mootools-more.js-ver=20130324.js"></script>
- <script type="text/javascript" src="../nav/nav.js-ver=20130324.js"></script>
- <script type="text/javascript" src="../nav/user_guide_menu.js-ver=20130324.js"></script>
- <meta name="robots" content="all" />
- <meta name="author" content="ExpressionEngine Dev Team" />
- <meta name="description" content="CodeIgniter 中文手册, CodeIgniter 用户指南, CodeIgniter User Guide, Wiki 文档" />
- </head>
- <body>
- <!-- START NAVIGATION -->
- <div id="nav">
- <div id="nav_inner">
- <script type="text/javascript">create_menu('../');</script>
- </div>
- </div>
- <script type="text/javascript">_setNavigation();</script>
- <div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="切换目录" alt="切换目录" /></a></div>
- <div id="masthead" class="clearfix">
- <div class="topbar-hd"><h1>CodeIgniter 用户指南 版本 2.2.0</h1></div>
- <div class="topbar-tip">编辑文档、查看近期更改请 <a href="#">登录</a> 或 <a href="#">注册</a> <a href="#">找回密码</a></div> <div id="breadcrumb_right"><a href="../toc.html">目录页</a></div>
- </div>
- <!-- END NAVIGATION -->
- <!-- START BREADCRUMB -->
- <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
- <tr>
- <td id="breadcrumb">
- <a href="#" target="_blank">CodeIgniter 中国首页</a> ›
- <a href="../index.html">用户指南首页</a> › CodeIgniter 是什么? </td>
- <td id="searchbox">
- <form method="get" action="http://www.google.com.hk/search" target="google_window">
- <input type="hidden" name="client" value="pub-0176846097796333"></input>
- <input type="hidden" name="forid" value="1"></input>
- <input type="hidden" name="ie" value="UTF-8"></input>
- <input type="hidden" name="oe" value="UTF-8"></input>
- <input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.org.cn/user_guide/" />
- 搜索用户指南
- <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />
-
- <input type="submit" class="submit" name="sa" value="Go" />
- </form>
- </td>
- </tr>
- </table>
- <!-- END BREADCRUMB -->
- <div style="clear:both;text-align:right;padding: 6px 40px 0 0;">
- <a href="#" target="_blank">查看原文</a>
- </div>
- <!--<br clear="all" />--><!-- START CONTENT -->
- <div id="content">
- <h1><font size="5">CodeIgniter 是什么?</font></h1>
- <h2>CodeIgniter 是一个应用程序框架</h2>
- <p>CodeIgniter 是一个为用 PHP 编写网络应用程序的人员提供的工具包。它的目标是实现让你比从零开始编写代码更快速地开发项目,为此,CI 提供了一套丰富的类库来满足通常的任务需求,并且提供了一个简单的接口和逻辑结构来调用这些库。CodeIgniter 可以将需要完成的任务代码量最小化,这样你就可以把更多的精力放到项目的开发上了。</p>
- <h2>CodeIgniter 是免费的</h2>
- <p>CodeIgniter 是经过 Apache/BSD-style 开源许可授权的,只要你愿意就可以使用它。阅读 <a href="../license.html">许可协议</a> 可获得更多的信息。</p>
- <h2>CodeIgniter 是轻量级的</h2>
- <p>真正的轻量级。我们的核心系统只需要一些非常小的库,这与那些需要更多资源的框架完全相反。额外的库文件只在请求的时候加载,依需求而定,所以核心系统是非常快而且轻的。</p>
- <h2>CodeIgniter 是快速的</h2>
- <p>速度非常快。你要找到一个比 CodeIgniter 表现更优的框架应该很难吧。</p>
- <h2>CodeIgniter 使用 M-V-C 模型</h2>
- <p>CodeIgniter 使用了模型(Model)- 视图(View)- 控制器(Controllers)的方法,这样可以更好地使表现层和逻辑层分离。这对项目的模板设计者来说是非常有用的,它最小化了模板中的程序代码量。我们在 MVC 各自的页面中对此做了更多的介绍。</p>
- <h2>CodeIgniter 生成干净的 URL</h2>
- <p>CodeIgniter 生成的 URL 非常干净而且是对搜索引擎友好化的。不同于标准的“字符串查询”方法,CodeIgniter使用了 基于段 的方法:</p>
- <code>example.com/<var>news</var>/<dfn>article</dfn>/<samp>345</samp></code>
- <p>注意:index.php 文件是被默认包含在 URL 中的,但是可以通过更改 .htaccess 文件来改变这个设置。</p>
- <h2>CodeIgniter 功能强大</h2>
- <p>CodeIgniter 拥有全范围的类库,可以完成大多数通常需要的网络开发任务,包括: 读取数据库、发送电子邮件、数据确认、保存 session 、对图片的操作,以及支持 XML-RPC 数据传输等。</p>
- <h2>CodeIgniter 是可扩展的</h2>
- <p>这个系统可以非常简单的通过自定义类库、辅助函数来进行扩展,或者也可以通过扩展类、系统钩子来实现。</p>
- <h2>CodeIgniter 不需要模板引擎</h2>
- <p>虽然 CodeIgniter <em>确实</em> 自带了一个可选的模板解析器程序,但不要求你必须使用模板。模板引擎完全与本地化PHP代码的性能需求不符,使用模板引擎我们要学习其语法,这最低限度只比学PHP基础要容易一点点。考虑以下PHP代码:</p>
- <p><code><ul><br />
- <br />
- <?php foreach ($addressbook as $name):?><br />
- <br />
- <li><?=$name?></li><br />
- <br />
- <?php endforeach; ?><br />
- <br />
- </ul></code></p>
- <p>再来对比模板引擎所使用的伪代码:</p>
- <p><code><ul><br />
- <br />
- {foreach from=$addressbook item="name"}<br />
- <br />
- <li>{$name}</li><br />
- <br />
- {/foreach}<br />
- <br />
- </ul></code></p>
- <p>的确,例中模板引擎的代码比较清晰,但这带来一个性能问题,因为伪代码要先被转换成PHP才能运行。我们的目标是<em>性能最大化</em>, 所以我们选择不使用专用的模板引擎。</p>
- <h2>CodeIgniter 已彻底文档化</h2>
- <p>程序员都喜欢写代码讨厌写文档。当然我们也一样,但是既然文档和代码本身一样重要,我们就要完成它。况且我们代码资源极其干净而且方便注释。</p>
- <h2>CodeIgniter 拥有一个友好的用户社区</h2>
- <p>你可以在我们的 <a href="#">社区论坛 </a>中看到一个成长中的积极活跃的用户社区。</p><p> </p>
- <div id="Contributors">
- 翻译贡献者:
- csfhc, Hex, iptton, irini, IT不倒翁, Rayne</div>
- <div id="DocDate">
- 最后修改: 2014-01-02 21:34:11</div>
- </div>
- <!-- END CONTENT -->
- <div id="footer">
- <p>
- 上一个主题: <a href="getting_started.html">开始</a> · <a href="#top">页首</a>
- · <a href="../index.html">用户指南首页</a> · 下一个主题: <a href="cheatsheets.html">CodeIgniter 速记表</a> </p>
- <p><a href="#">CodeIgniter</a> · 版权所有 © 2006-2013 · <a href="#">Ellislab, Inc.</a></p>
- <p>中文化: <a href="#">CodeIgniter 中国</a> · 制作: Hex · 版本: 1.30 · 鸣谢: 子非鱼</p>
- </div>
- </body>
- </html>
|