主要有三個目錄javascript
一、application目錄:用於開發者編寫相應的配置以及邏輯處理,開發者只需在這個目錄下添加本身須要的開發文件。php
二、system目錄:框架的系統庫,裏面包括核心庫,類庫,輔助類庫,數據庫等,這些文件,開發者最好不要擅自修改,它是整個框架的龍脈。html
三、user_guide:用戶手冊。前端
{ ● benchmark: "Benchmark", ● hooks: "Hooks", ● config: "Config", ● log: "Log", ● utf8: "Utf8", ● uri: "URI", ● router: "Router", ● output: "Output", ● security: "Security", ● input: "Input", ● lang: "Lang", ● loader: "Loader" }
每一個類庫的註釋在上圖已有解釋。java
/** * Helper Loader * * @param string|string[] $helpers Helper name(s) * @return object */ public function helper($helpers = array()) { is_array($helpers) OR $helpers = array($helpers); foreach ($helpers as &$helper) { $filename = basename($helper); $filepath = ($filename === $helper) ? '' : substr($helper, 0, strlen($helper) - strlen($filename)); $filename = strtolower(preg_replace('#(_helper)?(\.php)?$#i', '', $filename)).'_helper'; $helper = $filepath.$filename; if (isset($this->_ci_helpers[$helper])) { continue; } // Is this a helper extension request? $ext_helper = config_item('subclass_prefix').$filename; $ext_loaded = FALSE; foreach ($this->_ci_helper_paths as $path) { if (file_exists($path.'helpers/'.$ext_helper.'.php')) { include_once($path.'helpers/'.$ext_helper.'.php'); $ext_loaded = TRUE; } } // If we have loaded extensions - check if the base one is here if ($ext_loaded === TRUE) { $base_helper = BASEPATH.'helpers/'.$helper.'.php'; if ( ! file_exists($base_helper)) { show_error('Unable to load the requested file: helpers/'.$helper.'.php'); } include_once($base_helper); $this->_ci_helpers[$helper] = TRUE; log_message('info', 'Helper loaded: '.$helper); continue; } // No extensions found ... try loading regular helpers and/or overrides foreach ($this->_ci_helper_paths as $path) { if (file_exists($path.'helpers/'.$helper.'.php')) { include_once($path.'helpers/'.$helper.'.php'); $this->_ci_helpers[$helper] = TRUE; log_message('info', 'Helper loaded: '.$helper); break; } } // unable to load the helper if ( ! isset($this->_ci_helpers[$helper])) { show_error('Unable to load the requested file: helpers/'.$helper.'.php'); } } return $this; }
$db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => '', 'password' => '', 'database' => '', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
Key | Description | Default |
benchmarks | 在各個計時點花費的時間以及總時間 TRUE | |
config | CodeIgniter 配置變量 TRUE | |
controller_info | 被請求的控制器類和調用的方法 TRUE | |
get | 請求中的全部 GET 數據 TRUE | |
http_headers | 本次請求的 HTTP 頭部 TRUE | |
memory_usage | 本次請求消耗的內存(單位字節) TRUE | |
post | 請求中的全部 POST 數據 TRUE | |
queries | 列出全部執行的數據庫查詢,以及執行時間 TRUE | |
uri_string | 本次請求的 URI TRUE | |
session_data | 當前會話中存儲的數據 TRUE | |
query_toggle_count | 指定顯示多少個數據庫查詢,剩下的則默認摺疊起來 25 |