一、 运行流程

  1. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.
  2. The Router examines the HTTP request to determine what should be done with it.
  3. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.
  4. Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security.
  5. The Controller loads the model, core libraries, helpers, and any other resources needed to process the specific request.
  6. 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的更多相关文章

  1. 此文件时入口文件index.php

    此文件时入口文件index.php <?php //定义一下ThinkPHP框架存放的路径 define('THINK_PATH','./ThinkPHP/'); //定义当前的项目的名称,此处 ...

  2. CI 框架怎么去掉隐藏入口文件 index.php

    当我重新接触一个框架的时候首先肯定要去掉入口文件,也就是index.php 这个东西在url上很不漂亮,而且每次我访问我的网站的时候都要打进去url里面.这样告诉一个去掉 CI框架里面入口文件的方法, ...

  3. 入口文件 index.php 隐藏

    入口文件 index.php 隐藏 在PHP的web项目中,问了隐藏项目的开发语言,我们首先会选择把项目的入口文件index.php(如果做了特殊配置,特殊处理)在URL中隐藏掉. 当然部署中还需要隐 ...

  4. ThinkPHP5.X PHP5.6.27-nts + Apache 通过 URL 重写来隐藏入口文件 index.php

    我们先来看看官方手册给出关于「URL 重写」的参考: 可以通过 URL 重写隐藏应用的入口文件 index.php ,Apache 的配置参考: 1.http.conf 配置文件加载 mod_rewr ...

  5. 详细解析Thinkphp5.1源码执行入口文件index.php运行过程

    详细解析Thinkphp5.1源码执行入口文件index.php运行过程 运行了public目录下的index.php文件后,tp的运行整个运行过程的解析 入口文件index.php代码如下: < ...

  6. ubuntu-apache下隐藏thinkphp入口文件index.php

    按照thinkphp手册中来讲,apache服务器下,隐藏thinkphp入口文件有3步: httpd.conf配置文件中加载了mod_rewrite.so模块 AllowOverride None ...

  7. CodeIgniter框架——源码分析之入口文件index.php

    CodeIgniter框架的入口文件主要是配置开发环境,定义目录常量,加载CI的核心类core/CodeIgniter.php.   在index.php中,CI首先做的事情就是设置PHP的错误报告, ...

  8. CI 框架源码解析一之入口文件 index.php

    Index.php作为CI框架的入口文件,源码分析,自然而然由此开始.在源码分析的过程中,我们并不会逐行进行解释,而只解释核心的功能和实现,如果英文水平很好的话,读过index.php文件的英文注释之 ...

  9. APACHE重写去除入口文件index.php

    下面我说下 apache 下 ,如何 去掉URL 里面的 index.php 例如: 你原来的路径是: localhost/index.php/index 改变后的路径是: localhost/ind ...

随机推荐

  1. React Native 中的component 的生命周期

    React Native中的component跟Android中的activity,fragment等一样,存在生命周期,下面先给出component的生命周期图 getDefaultProps ob ...

  2. Android高仿UC浏览器和360手机卫士消息常驻栏(通知栏)

    之前网上看了下自己定义消息栏,通知栏,了解到了Notification这个控件.发现UC浏览器等都是这样的类型,今天写个demo实现下.如图: 当中每一个button都有不同的功能.代码例如以下: p ...

  3. 怎样对Android设备进行网络抓包

    问题描写叙述: 前段时间自己的app訪问server的url总是会出现间接性失败的问题,于是和server的同事开了个会.提出了他们server存在的这个bug,我的同事自然说自己的server没问题 ...

  4. Android开源框架ViewPageIndicator和ViewPager实现Tab导航

    前言: 关于使用ViewPageIndicator和ViewPager实现Tab导航,在开发社区里已经有一堆的博客对其进行了介绍,假设我还在这里写怎样去实现.那简直就是老生常谈,毫无新奇感,并且.我也 ...

  5. The bytes/str dichotomy in Python 3

    The bytes/str dichotomy in Python 3 - Eli Bendersky's website https://eli.thegreenplace.net/2012/01/ ...

  6. ios2--UIView的常见属性

    // // ViewController.m // 06-UIView的常见属性 // #import "ViewController.h" @interface ViewCont ...

  7. MarkMonitor 目前最安全的域名注册商,因此,世界500强网站中的22%域名托管于markmonitor公司

    也许你查询某个大型公司域名whios信息时,常常会发现很多这些大型公司的域名都在一家名为MarkMonitor的公司注册,那么markmonitor是家什么样的公司呢? MarkMonitor是一家从 ...

  8. Coursera Algorithms week4 基础标签表 练习测验:Java autoboxing and equals

    1. Java autoboxing and equals(). Consider two double values a and b and their corresponding Double v ...

  9. handbook/CentOS/使用免费SSL证书让网站支持HTTPS访问.md

  10. [Swift通天遁地]八、媒体与动画-(4)给相机添加CoreImage滤镜效果

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...