Code Igniter Application Flow Chart 系统流程图表
从Code Igniter文档看到的整个系统运行的程序流程。
-
Index.php作为前端控制器,初期化所有的所需的基本资源来运行CodeIgniter。
-
路由来检查HTTP请求来决定做什么。
-
如果缓存文件存在,那么直接将结果返回浏览器。
-
安全检查,如果控制器被加载了,任何HTTP请求和用户提交的数据都会进行过滤。
-
控制器加载了实体类,核心类库,插件,帮主函数和其他需要执行请求的资源。
-
最终渲染显示并发送到浏览器端。如果已打开缓存,那么页面如果已被缓存就直接读取缓存。
-
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, plugins, 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.