入口文件 index.php

1、 運行流程php

  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.

2、入口文件web

  一、定義當前運行環境,並設置錯誤級別app

      二、定義系統文件路徑 $system_path、應用目錄 $application_folder、視圖目錄 $view_folder , 並格式化 realpathorm

      三、 定義常量:blog

    •  SELF 入口文件名 
    •  BASEPATH 系統目錄
    • FCPATH     入口文件所在目錄
    • SYSDIR    系統文件名 system
    • APPPATH
    • VIEWPATH

3、引用核心文件  core/CodeIgniter.phpci

相關文章
相關標籤/搜索