Code Igniter Application Flow Chart 系统流程图表

从Code Igniter文档看到的整个系统运行的程序流程。

  1. Index.php作为前端控制器,初期化所有的所需的基本资源来运行CodeIgniter。

  2. 路由来检查HTTP请求来决定做什么。

  3. 如果缓存文件存在,那么直接将结果返回浏览器。

  4. 安全检查,如果控制器被加载了,任何HTTP请求和用户提交的数据都会进行过滤。

  5. 控制器加载了实体类,核心类库,插件,帮主函数和其他需要执行请求的资源。

  6. 最终渲染显示并发送到浏览器端。如果已打开缓存,那么页面如果已被缓存就直接读取缓存。

  7. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.

  8. The Router examines the HTTP request to determine what should be done with it.

  9. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.

  10. Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security.

  11. The Controller loads the model, core libraries, plugins, helpers, and any other resources needed to process the specific request.

  12. 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.