PageRenderTime 47ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/thoughtclinic/client_ci_bkup/index.php

https://gitlab.com/suresh.b/TTC
PHP | 206 lines | 51 code | 29 blank | 126 comment | 7 complexity | 54216b75cb31b0b3069c51523259eae4 MD5 | raw file
  1. <?php
  2. date_default_timezone_set("Asia/Kolkata");
  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. if (defined('ENVIRONMENT'))
  31. {
  32. switch (ENVIRONMENT)
  33. {
  34. case 'development':
  35. error_reporting(E_ALL);
  36. break;
  37. case 'testing':
  38. case 'production':
  39. error_reporting(0);
  40. break;
  41. default:
  42. exit('The application environment is not set correctly.');
  43. }
  44. }
  45. /*
  46. *---------------------------------------------------------------
  47. * SYSTEM FOLDER NAME
  48. *---------------------------------------------------------------
  49. *
  50. * This variable must contain the name of your "system" folder.
  51. * Include the path if the folder is not in the same directory
  52. * as this file.
  53. *
  54. */
  55. $system_path = 'system';
  56. /*
  57. *---------------------------------------------------------------
  58. * APPLICATION FOLDER NAME
  59. *---------------------------------------------------------------
  60. *
  61. * If you want this front controller to use a different "application"
  62. * folder then the default one you can set its name here. The folder
  63. * can also be renamed or relocated anywhere on your server. If
  64. * you do, use a full server path. For more info please see the user guide:
  65. * http://codeigniter.com/user_guide/general/managing_apps.html
  66. *
  67. * NO TRAILING SLASH!
  68. *
  69. */
  70. $application_folder = '../application/client';
  71. /*
  72. * --------------------------------------------------------------------
  73. * DEFAULT CONTROLLER
  74. * --------------------------------------------------------------------
  75. *
  76. * Normally you will set your default controller in the routes.php file.
  77. * You can, however, force a custom routing by hard-coding a
  78. * specific controller class/function here. For most applications, you
  79. * WILL NOT set your routing here, but it's an option for those
  80. * special instances where you might want to override the standard
  81. * routing in a specific front controller that shares a common CI installation.
  82. *
  83. * IMPORTANT: If you set the routing here, NO OTHER controller will be
  84. * callable. In essence, this preference limits your application to ONE
  85. * specific controller. Leave the function name blank if you need
  86. * to call functions dynamically via the URI.
  87. *
  88. * Un-comment the $routing array below to use this feature
  89. *
  90. */
  91. // The directory name, relative to the "controllers" folder. Leave blank
  92. // if your controller is not in a sub-folder within the "controllers" folder
  93. // $routing['directory'] = '';
  94. // The controller class file name. Example: Mycontroller
  95. // $routing['controller'] = '';
  96. // The controller function you wish to be called.
  97. // $routing['function'] = '';
  98. /*
  99. * -------------------------------------------------------------------
  100. * CUSTOM CONFIG VALUES
  101. * -------------------------------------------------------------------
  102. *
  103. * The $assign_to_config array below will be passed dynamically to the
  104. * config class when initialized. This allows you to set custom config
  105. * items or override any default config values found in the config.php file.
  106. * This can be handy as it permits you to share one application between
  107. * multiple front controller files, with each file containing different
  108. * config values.
  109. *
  110. * Un-comment the $assign_to_config array below to use this feature
  111. *
  112. */
  113. // $assign_to_config['name_of_config_item'] = 'value of config item';
  114. // --------------------------------------------------------------------
  115. // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
  116. // --------------------------------------------------------------------
  117. /*
  118. * ---------------------------------------------------------------
  119. * Resolve the system path for increased reliability
  120. * ---------------------------------------------------------------
  121. */
  122. // Set the current directory correctly for CLI requests
  123. if (defined('STDIN'))
  124. {
  125. chdir(dirname(__FILE__));
  126. }
  127. if (realpath($system_path) !== FALSE)
  128. {
  129. $system_path = realpath($system_path).'/';
  130. }
  131. // ensure there's a trailing slash
  132. $system_path = rtrim($system_path, '/').'/';
  133. // Is the system path correct?
  134. if ( ! is_dir($system_path))
  135. {
  136. exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
  137. }
  138. /*
  139. * -------------------------------------------------------------------
  140. * Now that we know the path, set the main path constants
  141. * -------------------------------------------------------------------
  142. */
  143. // The name of THIS file
  144. define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
  145. // The PHP file extension
  146. // this global constant is deprecated.
  147. define('EXT', '.php');
  148. // Path to the system folder
  149. define('BASEPATH', str_replace("\\", "/", $system_path));
  150. // Path to the front controller (this file)
  151. define('FCPATH', str_replace(SELF, '', __FILE__));
  152. // Name of the "system folder"
  153. define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
  154. // The path to the "application" folder
  155. if (is_dir($application_folder))
  156. {
  157. define('APPPATH', $application_folder.'/');
  158. }
  159. else
  160. {
  161. if ( ! is_dir(BASEPATH.$application_folder.'/'))
  162. {
  163. exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
  164. }
  165. define('APPPATH', BASEPATH.$application_folder.'/');
  166. }
  167. /*
  168. * --------------------------------------------------------------------
  169. * LOAD THE BOOTSTRAP FILE
  170. * --------------------------------------------------------------------
  171. *
  172. * And away we go...
  173. *
  174. */
  175. require_once BASEPATH.'core/CodeIgniter.php';
  176. /* End of file index.php */
  177. /* Location: ./index.php */