亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

CI加載流程小結

2019-11-15 02:05:51
字體:
來源:轉載
供稿:網友
CI加載流程小結

  無聊,決定水一把。

  CI(CodeIgniter)是我最早接觸的一個框架,到現在也只是用了其中一點零碎的方法。一直想對其流程做個小結,卻總是因各種各樣的“理由”挨著。看見別人圖表齊上陣,沒那耐心,就從代碼說起吧,權當做個筆記,紀念一下。

  看在線的用戶手冊,也知道,將CI下載下來(最新版本2.2.1),解壓到機子上,比如www目錄,可改個根目錄名(原名CodeIgniter-2.2-stable太長),初步目錄文件如下,當然這在是windows下面。

  

訪問下,如localhost/ci/index.php,就進入CI默認的Welcome頁面

  

  如何一步步加載這個頁面的?首先訪問的是index.php腳本

  1 <?php  2   3 /*  4  *---------------------------------------------------------------  5  * application ENVIRONMENT  6  *---------------------------------------------------------------  7  *  8  * You can load different configurations depending on your  9  * current environment. Setting the environment also influences 10  * things like logging and error reporting. 11  * 12  * This can be set to anything, but default usage is: 13  * 14  *     development 15  *     testing 16  *     PRoduction 17  * 18  * NOTE: If you change these, also change the error_reporting() code below 19  * 20  */ 21     define('ENVIRONMENT', 'development'); 22 /* 23  *--------------------------------------------------------------- 24  * ERROR REPORTING 25  *--------------------------------------------------------------- 26  * 27  * Different environments will require different levels of error reporting. 28  * By default development will show errors but testing and live will hide them. 29  */ 30  31 if (defined('ENVIRONMENT')) 32 { 33     switch (ENVIRONMENT) 34     { 35         case 'development': 36             error_reporting(E_ALL); 37         break; 38  39         case 'testing': 40         case 'production': 41             error_reporting(0); 42         break; 43  44         default: 45             exit('The application environment is not set correctly.'); 46     } 47 } 48  49 /* 50  *--------------------------------------------------------------- 51  * SYSTEM FOLDER NAME 52  *--------------------------------------------------------------- 53  * 54  * This variable must contain the name of your "system" folder. 55  * Include the path if the folder is not in the same  directory 56  * as this file. 57  * 58  */ 59     $system_path = 'system'; 60  61 /* 62  *--------------------------------------------------------------- 63  * APPLICATION FOLDER NAME 64  *--------------------------------------------------------------- 65  * 66  * If you want this front controller to use a different "application" 67  * folder then the default one you can set its name here. The folder 68  * can also be renamed or relocated anywhere on your server.  If 69  * you do, use a full server path. For more info please see the user guide: 70  * http://codeigniter.com/user_guide/general/managing_apps.html 71  * 72  * NO TRAILING SLASH! 73  * 74  */ 75     $application_folder = 'application'; 76  77 /* 78  * -------------------------------------------------------------------- 79  * DEFAULT CONTROLLER 80  * -------------------------------------------------------------------- 81  * 82  * Normally you will set your default controller in the routes.php file. 83  * You can, however, force a custom routing by hard-coding a 84  * specific controller class/function here.  For most applications, you 85  * WILL NOT set your routing here, but it's an option for those 86  * special instances where you might want to override the standard 87  * routing in a specific front controller that shares a common CI installation. 88  * 89  * IMPORTANT:  If you set the routing here, NO OTHER controller will be 90  * callable. In essence, this preference limits your application to ONE 91  * specific controller.  Leave the function name blank if you need 92  * to call functions dynamically via the URI. 93  * 94  * Un-comment the $routing array below to use this feature 95  * 96  */ 97     // The directory name, relative to the "controllers" folder.  Leave blank 98     // if your controller is not in a sub-folder within the "controllers" folder 99     // $routing['directory'] = '';100 101     // The controller class file name.  Example:  Mycontroller102     // $routing['controller'] = '';103 104     // The controller function you wish to be called.105     // $routing['function']    = '';106 107 108 /*109  * -------------------------------------------------------------------110  *  CUSTOM CONFIG VALUES111  * -------------------------------------------------------------------112  *113  * The $assign_to_config array below will be passed dynamically to the114  * config class when initialized. This allows you to set custom config115  * items or override any default config values found in the config.php file.116  * This can be handy as it permits you to share one application between117  * multiple front controller files, with each file containing different118  * config values.119  *120  * Un-comment the $assign_to_config array below to use this feature121  *122  */123     // $assign_to_config['name_of_config_item'] = 'value of config item';124 125 126 127 // --------------------------------------------------------------------128 // END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE129 // --------------------------------------------------------------------130 131 /*132  * ---------------------------------------------------------------133  *  Resolve the system path for increased reliability134  * ---------------------------------------------------------------135  */136 137     // Set the current directory correctly for CLI requests138     if (defined('STDIN'))139     {140         chdir(dirname(__FILE__));141     }142 143     if (realpath($system_path) !== FALSE)144     {145         $system_path = realpath($system_path).'/';146     }147 148     // ensure there's a trailing slash149     $system_path = rtrim($system_path, '/').'/';150 151     // Is the system path correct?152     if ( ! is_dir($system_path))153     {154         exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));155     }156 157 /*158  * -------------------------------------------------------------------159  *  Now that we know the path, set the main path constants160  * -------------------------------------------------------------------161  */162     // The name of THIS file163     define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));164 165     // The PHP file extension166     // this global constant is deprecated.167     define('EXT', '.php');168 169     // Path to the system folder170     define('BASEPATH', str_replace("http://", "/", $system_path));171 172     // Path to the front controller (this file)173     define('FCPATH', str_replace(SELF, '', __FILE__));174 175     // Name of the "system folder"176     define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));177 178 179     // The path to the "application" folder180     if (is_dir($application_folder))181     {182         define('APPPATH', $application_folder.'/');183     }184     else185     {186         if ( ! is_dir(BASEPATH.$application_folder.'/'))187         {188             exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);189         }190 191         define('APPPATH', BASEPATH.$application_folder.'/');192     }193 194 /*195  * --------------------------------------------------------------------196  * LOAD THE BOOTSTRAP FILE197  * --------------------------------------------------------------------198  *199  * And away we go...200  *201  */202 require_once BASEPATH.'core/CodeIgniter.php';203 204 /* End of file index.php */205 /* Location: ./index.php */
View Code

  21行:首先定義一個ENV

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
亚洲成人国产精品| 欧美俄罗斯性视频| 精品丝袜一区二区三区| www.亚洲一区| 国产精品亚洲视频在线观看| 日韩最新中文字幕电影免费看| 九九热精品在线| 国产性猛交xxxx免费看久久| 日韩精品一区二区视频| 青青精品视频播放| 欧美另类第一页| 久久久成人精品视频| 中文字幕精品在线| 国产在线播放不卡| 亚洲v日韩v综合v精品v| 久久久久久国产精品三级玉女聊斋| 国产一区二区色| 国产精品视频导航| 韩国视频理论视频久久| 国内伊人久久久久久网站视频| 热99精品只有里视频精品| 欧美黑人视频一区| 久久频这里精品99香蕉| 最近2019年手机中文字幕| 亚洲天堂第二页| 国产精品久久久久999| 91视频免费在线| 国产精品视频不卡| 这里只有精品在线观看| 伊人久久男人天堂| 欧美激情中文网| 中文字幕久热精品视频在线| 91久久精品日日躁夜夜躁国产| 日韩欧美精品在线观看| 久久久久久伊人| 亚洲精品福利在线观看| 日韩免费高清在线观看| 国产成人精品免高潮费视频| 亚洲美女www午夜| 欧美成人亚洲成人日韩成人| 操人视频在线观看欧美| 在线色欧美三级视频| 国产精品成人v| 成人黄色在线观看| 日韩在线欧美在线国产在线| 亚洲精品按摩视频| 在线观看精品国产视频| 久久久久久久久国产精品| 久久免费精品日本久久中文字幕| 97成人精品视频在线观看| 97不卡在线视频| 亚洲欧美日本精品| 国产精品久久久久久久久久尿| 亚洲天堂第二页| 日韩视频免费观看| 91免费看视频.| 久久97久久97精品免视看| 中文字幕亚洲国产| 国产福利视频一区| 欧美床上激情在线观看| 九九视频这里只有精品| 国产成人极品视频| 亚洲二区中文字幕| 日韩美女在线播放| 欧美电影在线观看完整版| 国产美女精品视频免费观看| 亚洲黄色www网站| 国产精品av在线| 91精品国产综合久久香蕉的用户体验| 亚洲欧美在线免费观看| 久久久精品影院| 亚洲国产精品美女| 免费91麻豆精品国产自产在线观看| 中文字幕日韩在线视频| 韩国国内大量揄拍精品视频| 国产成人精品午夜| 日韩三级成人av网| 亚洲区一区二区| 尤物yw午夜国产精品视频| 亚洲成人免费在线视频| 国产视频亚洲精品| 国产小视频91| 日韩欧美精品免费在线| 韩国三级日本三级少妇99| 国产一区二区三区在线播放免费观看| 国产精品都在这里| 欧美性理论片在线观看片免费| 久久久电影免费观看完整版| 国产精品国内视频| 久久久www成人免费精品| 日韩中文字幕在线看| 日本精品在线视频| 91久久综合亚洲鲁鲁五月天| 狠狠色香婷婷久久亚洲精品| 俺去亚洲欧洲欧美日韩| 欧美视频在线视频| 欧美一级大片在线免费观看| 亚洲人精选亚洲人成在线| 亚洲欧美国产日韩天堂区| 国产精品久久久久久久久久久久久久| 欧美色道久久88综合亚洲精品| 国内精品一区二区三区| 久久久精品一区| 亚洲免费av电影| 国产精品视频网址| 久热精品在线视频| 91产国在线观看动作片喷水| 日韩国产中文字幕| 久热爱精品视频线路一| 日韩精品极品视频| 日本高清久久天堂| 3344国产精品免费看| 日韩欧美中文在线| 91精品视频在线免费观看| 性欧美办公室18xxxxhd| 亚洲人成绝费网站色www| 97精品一区二区三区| 91久久精品日日躁夜夜躁国产| 国产一区玩具在线观看| 成人激情免费在线| 亚洲国产精久久久久久久| 美乳少妇欧美精品| 亚洲a一级视频| 国产精品私拍pans大尺度在线| 97在线看免费观看视频在线观看| 日韩国产精品视频| 成人美女av在线直播| 国精产品一区一区三区有限在线| 久久久女女女女999久久| 国产精品福利久久久| 国产成人97精品免费看片| 久久精品国产v日韩v亚洲| 日本精品中文字幕| 精品国产视频在线| 欧美中文字幕视频| 亚洲最大福利视频网| 国产成人精品久久二区二区91| 欧美性猛交xxxx免费看漫画| 精品在线小视频| 国产精品电影网站| 一区二区中文字幕| 欧美极品少妇xxxxⅹ喷水| 午夜精品久久久99热福利| 原创国产精品91| 日韩中文字幕精品| 欧美成人精品不卡视频在线观看| 国产成人aa精品一区在线播放| 久久99国产综合精品女同| 成人免费自拍视频| 亚洲欧美日韩中文在线制服| 日韩av观看网址| 911国产网站尤物在线观看| 欧美激情在线狂野欧美精品| 精品调教chinesegay| 人体精品一二三区| 欧美精品在线第一页| 亚洲激情在线观看| 亚洲老板91色精品久久| 亚洲美女免费精品视频在线观看| 欧美精品videossex性护士| 国产精品视频在线播放| 久久亚洲影音av资源网| 色与欲影视天天看综合网| 亚洲一区免费网站|