index.php in the Extract directory of CI, and the system folder and <?php//definition environment,system_path,application_folder//according to System_path, Application_folder, defining constants basepath,apppath,self, ext, fcpath,sysdir *----------------------------- ---------------------------------- * application environment *---------------------------- ----------------------------------- * * You can load different Configurations depending on your * current environment. setting the environment also influences * things like logging and error reporting. * * This can be set to anything, but default usage is: * * development * testing * production * * note: if you change these, also chaNge the error_reporting () code below * */ //ENVIRONMENT decide whether to error define (' Environment ', ' development ');/* *----------------------------------------------------- ---------- * error reporting *------------------------------------------------------------ --- * * different environments will require different levels of error reporting. * By default development will show errors but testing and live will hide them. */if (Defined (' ENVIRONMENT ')) { switch (Environment) { case ' development ': //e_all : All errors are reported error_reporting (e_all); break; case ' testing ': case ' production ': error_reporting (0); break; default: exit (' The application environment is not set correctly. '); }}//system the name of the folder, who did not change it ah/* *--------------------------------------------------------------- * system folder name *--------------------------------------------------------------- * * this variable must contain the name of your "System" folder. * include the path if the folder is not in the same directory * as this file. * */ $system _path = ' system '; //look for the folder in which the controller // no back slash!! /* *--------------------------------------------------------------- * application folder name *--------------------------------------------------------------- * * If you want this front controller to use a different "Application " * folder then the default one you can set its name here. The folder * can also be renamed or Relocated anywhere on your server. if * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * * no trailing slash! * */ $application _folder = ' application/mysjjy '; // system/core/router.php /* * ------------------------------------------------------------------- - * default controller * ------------------------------------------------------------ -------- * * Normally you will set your default controller in the routes.php file. * you can, however, force a custom routing by hard-coding a * specific controller class/function here. for Most applications, you * will not set your routing here, but it ' S an option for those * special instances where you might want to override the standard * routing in a specific front controller that shares a common ci installation. * * important: if you set the routing here, no other controller will be * callable. In essence, this preference Limits your application to one * specific controller. leave the function namE blank if you need * to call functions dynamically via the URI. * * Un-comment the $routing array below to Use this feature * */ // the directory name, relative to the "Controllers" folder. Leave blank // if your controller is not in a sub-folder within the "Controllers" folder // $routing [' directory '] = '; // the controller class file name. Example: Mycontroller // $routing [' Controller '] = '; // the controller function you wish to be called. // $ routing[' function '] = ';/* * ------------------------------------------------------------ ------- * CUSTOM config values * ------------------------------------------------------------------- * * The $assign _to_config array below will be passed dynamically to the * config class when initialized. this allows you to set custom config * items or override any default Config values found in the config.php file. * this can be handy as it permits you to share one application between * multiple front controller files, with each file containing different * config values. * * Un-comment the $assign _to_config array below to use this feature * */ // $assign _to_config[' Name_of_config_item '] = ‘ Value of config item ';// ----------------------------------------------------------------- ---// end of user configurable settings. do not edit below THIS LINE// --------------------------------------------------------------------/* * --------------------------------------------------------------- * Resolve the system path for increased reliability * ---------------------------------------- ----------------------- */ // set the current directory correctly for CLI requests if (Defined (' STDIN ')) { chdir (DirName (__file__)); } if (Realpath ($system _path) !== false) { $system _path = realpath ($system _path). ' /'; } //ensure that the system ends with/ // ensure there ' s a trailing slash $system _paTh = rtrim ($system _path, '/'). ' /'; //if System path is not a dir, error! // Is the system path correct? if ( ! is_dir ($system _path)) { exit ("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ". PathInfo (__file__, pathinfo_basename)); }/* * ------------------------------- ------------------------------------ * now that we know the path, set the main path constants * -------------------------------------------- ----------------------- */ //pathinfo Path Decomposition //SELF index.php // The name of this file define (' Self ', pathinfo (__file__, pathinfo_basename)) ; //extension // the php&Nbsp;file extension // this global constant is deprecated. define (' EXT ', '. php '); //defines basepath as system_path // path to the system Folder define (' BasePath ', str_replace ("\ \", "/", $system _path)); //Remove index.php Path to the front controller (this file) define (' Fcpath ', str_ Replace (self, ", __file__)); // name of the " System folder " Define (' Sysdir ', trim (STRRCHR (Trim (basepath, '/'), '/'), '/')); //defines apppath as $ Application_folder. ' /' // The path to the "Application" folder //is_dir ($filename) IF filename is a relative path, according to the current working directory to check its relative path //that is index.php is located in the directory is not Application_folder, look for system under no, Defined as apppath if (Is_dir ($application _folder)) { define (' APPPATH ', $application _ Folder. ' /‘); } else { if ( ! is_dir (basepath. $application _folder. /')) { exit ("your application folder path does not appear to be set correctly. please open the following file and correct this: ". self); } define (' APPPATH ', basepath. $application _folder. ' /'); }/* * -------------------------------------------------------------------- * load the bootstrap file * ----------------------------------------------------------- --------- * * and away we go... * */ //Reference System/core/ Codeigniter.phprequire_once basepath. ' Core/codeigniter.php ';/* end of file index.php *//* location: ./index.php */
CI Framework Source code entry file index.php that is where the program begins to execute