Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

56 lignes
1.8KB

  1. <?php
  2. // Path to the front controller (this file)
  3. define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
  4. // Ensure the current directory is pointing to the front controller's directory
  5. chdir(FCPATH);
  6. /*
  7. *---------------------------------------------------------------
  8. * BOOTSTRAP THE APPLICATION
  9. *---------------------------------------------------------------
  10. * This process sets up the path constants, loads and registers
  11. * our autoloader, along with Composer's, loads our constants
  12. * and fires up an environment-specific bootstrapping.
  13. */
  14. // Load our paths config file
  15. // This is the line that might need to be changed, depending on your folder structure.
  16. require FCPATH . '../app/Config/Paths.php';
  17. // ^^^ Change this line if you move your application folder
  18. $paths = new Config\Paths();
  19. // Location of the framework bootstrap file.
  20. require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
  21. // Load environment settings from .env files into $_SERVER and $_ENV
  22. require_once SYSTEMPATH . 'Config/DotEnv.php';
  23. (new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
  24. /*
  25. * ---------------------------------------------------------------
  26. * GRAB OUR CODEIGNITER INSTANCE
  27. * ---------------------------------------------------------------
  28. *
  29. * The CodeIgniter class contains the core functionality to make
  30. * the application run, and does all of the dirty work to get
  31. * the pieces all working together.
  32. */
  33. $app = Config\Services::codeigniter();
  34. $app->initialize();
  35. $context = is_cli() ? 'php-cli' : 'web';
  36. $app->setContext($context);
  37. /*
  38. *---------------------------------------------------------------
  39. * LAUNCH THE APPLICATION
  40. *---------------------------------------------------------------
  41. * Now that everything is setup, it's time to actually fire
  42. * up the engines and make this app do its thang.
  43. */
  44. $app->run();