index.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // Valid PHP Version?
  3. $minPHPVersion = '7.2';
  4. if (phpversion() < $minPHPVersion)
  5. {
  6. die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion());
  7. }
  8. unset($minPHPVersion);
  9. // Path to the front controller (this file)
  10. define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
  11. // Location of the Paths config file.
  12. // This is the line that might need to be changed, depending on your folder structure.
  13. $pathsPath = realpath(FCPATH . '../app/Config/Paths.php');
  14. //$pathsPath = realpath(FCPATH . '../CI4/app/Config/Paths.php');
  15. //basically with above pack everything into a dir called CI4 including app, system ,writable ,admin
  16. $_SERVER['CI_ENVIRONMENT'] = 'development';
  17. // ^^^ Change this if you move your application folder
  18. /*
  19. *---------------------------------------------------------------
  20. * BOOTSTRAP THE APPLICATION
  21. *---------------------------------------------------------------
  22. * This process sets up the path constants, loads and registers
  23. * our autoloader, along with Composer's, loads our constants
  24. * and fires up an environment-specific bootstrapping.
  25. */
  26. // Ensure the current directory is pointing to the front controller's directory
  27. chdir(__DIR__);
  28. // Load our paths config file
  29. require $pathsPath;
  30. $paths = new Config\Paths();
  31. // Location of the framework bootstrap file.
  32. $app = require rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php';
  33. /*
  34. *---------------------------------------------------------------
  35. * LAUNCH THE APPLICATION
  36. *---------------------------------------------------------------
  37. * Now that everything is setup, it's time to actually fire
  38. * up the engines and make this app do its thang.
  39. */
  40. $app->run();