入口文件 index.php
一、 运行流程

- The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.
- The Router examines the HTTP request to determine what should be done with it.
- If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.
- Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security.
- The Controller loads the model, core libraries, helpers, and any other resources needed to process the specific request.
- The finalized View is rendered then sent to the web browser to be seen. If caching is enabled, the view is cached first so that on subsequent requests it can be served.
二、入口文件
1、定义当前运行环境,并设置错误级别
2、定义系统文件路径 $system_path、应用目录 $application_folder、视图目录 $view_folder , 并格式化 realpath
3、 定义常量:
- SELF 入口文件名
- BASEPATH 系统目录
- FCPATH 入口文件所在目录
- SYSDIR 系统文件名 system
- APPPATH
- VIEWPATH
三、引用核心文件 core/CodeIgniter.php
入口文件 index.php的更多相关文章
- 此文件时入口文件index.php
此文件时入口文件index.php <?php //定义一下ThinkPHP框架存放的路径 define('THINK_PATH','./ThinkPHP/'); //定义当前的项目的名称,此处 ...
- CI 框架怎么去掉隐藏入口文件 index.php
当我重新接触一个框架的时候首先肯定要去掉入口文件,也就是index.php 这个东西在url上很不漂亮,而且每次我访问我的网站的时候都要打进去url里面.这样告诉一个去掉 CI框架里面入口文件的方法, ...
- 入口文件 index.php 隐藏
入口文件 index.php 隐藏 在PHP的web项目中,问了隐藏项目的开发语言,我们首先会选择把项目的入口文件index.php(如果做了特殊配置,特殊处理)在URL中隐藏掉. 当然部署中还需要隐 ...
- ThinkPHP5.X PHP5.6.27-nts + Apache 通过 URL 重写来隐藏入口文件 index.php
我们先来看看官方手册给出关于「URL 重写」的参考: 可以通过 URL 重写隐藏应用的入口文件 index.php ,Apache 的配置参考: 1.http.conf 配置文件加载 mod_rewr ...
- 详细解析Thinkphp5.1源码执行入口文件index.php运行过程
详细解析Thinkphp5.1源码执行入口文件index.php运行过程 运行了public目录下的index.php文件后,tp的运行整个运行过程的解析 入口文件index.php代码如下: < ...
- ubuntu-apache下隐藏thinkphp入口文件index.php
按照thinkphp手册中来讲,apache服务器下,隐藏thinkphp入口文件有3步: httpd.conf配置文件中加载了mod_rewrite.so模块 AllowOverride None ...
- CodeIgniter框架——源码分析之入口文件index.php
CodeIgniter框架的入口文件主要是配置开发环境,定义目录常量,加载CI的核心类core/CodeIgniter.php. 在index.php中,CI首先做的事情就是设置PHP的错误报告, ...
- CI 框架源码解析一之入口文件 index.php
Index.php作为CI框架的入口文件,源码分析,自然而然由此开始.在源码分析的过程中,我们并不会逐行进行解释,而只解释核心的功能和实现,如果英文水平很好的话,读过index.php文件的英文注释之 ...
- APACHE重写去除入口文件index.php
下面我说下 apache 下 ,如何 去掉URL 里面的 index.php 例如: 你原来的路径是: localhost/index.php/index 改变后的路径是: localhost/ind ...
随机推荐
- MapReduce04
===================== MapReduce内部机制:本地性 ===================== 什么是数据本地性(data locality)--------------- ...
- android TabHost控件
(一)TabHost控件,默认是在顶部显示的 TabHost是盛放Tab按钮和Tab内容的首要容器, TabWidget(tabs标签)用于选择页面,是指一组包含文本或图标的 ,FrameLayout ...
- git命令颜色设置
+ $ git config --global color.status auto + $ git config --global color.diff auto + $ git config --g ...
- 项目中如何使用NuGet添加类库
在项目上右键-->Manage NuGet Packages Browse 可以去搜索想要添加到项目的类库 Installed 已经添加到项目的类库 Updates 需要更新的类库
- bzoj2073
状压dp 预处理每个状态的初始值,枚举子集就行了 #include<bits/stdc++.h> using namespace std; , inf = ; int W, n; < ...
- P4049 [JSOI2007]合金
传送门 我数学可能白学了-- 因为三个数加起来等于\(1\),那么只要用前两个数就能表示,那么就能把每一种金属看成一个二维向量.考虑只有两个向量的时候,设这两个向量为\(a,b\),那么一个向量\(c ...
- Django day28 频率组件,解析器
一:频率组件: 1.频率是什么? 节流,访问控制 2. (1)内置的访问频率控制类SimpleRateThrottle (2)写一个类,继承SimpleRateThrottle class MyThr ...
- Codeforces 903G 巧妙的线段树
思路: 巧妙的线段树 想方法将网络流往数据结构方向转化 http://www.cnblogs.com/yyf0309/p/8724558.html //By SiriusRen #include &l ...
- scrapy 框架持久化存储
1.基于终端的持久化存储 保证爬虫文件的parse方法中有可迭代类型对象(通常为列表或字典)的返回,该返回值可以通过终端指令的形式写入指定格式的文件中进行持久化操作. # 执行输出指定格式进行存储:将 ...
- [转]HTML5 Day 4: Add Drop Down Menu to ASP.NET MVC HTML5 Template using CSS and jQuery
本文转自:http://pietschsoft.com/post/2010/11/17/HTML5-Day-4-Add-DropDown-Menu-ASPNET-MVC-HTML5-Template- ...