oil 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Fuel is a fast, lightweight, community driven PHP5 framework.
  4. *
  5. * @package Fuel
  6. * @version 1.5
  7. * @author Fuel Development Team
  8. * @license MIT License
  9. * @copyright 2010 - 2013 Fuel Development Team
  10. * @link http://fuelphp.com
  11. */
  12. /**
  13. * Refuse to run oil when called from php-cgi !
  14. */
  15. if (substr(php_sapi_name(), 0, 3) == 'cgi')
  16. {
  17. die("The use of oil is not supported when running php-cgi. Oil needs php-cli to function!\n\n");
  18. }
  19. /**
  20. * Set error reporting and display errors settings. You will want to change these when in production.
  21. */
  22. error_reporting(-1);
  23. ini_set('display_errors', 1);
  24. /**
  25. * Website document root
  26. */
  27. define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR);
  28. /**
  29. * Path to the application directory.
  30. */
  31. define('APPPATH', realpath(__DIR__.'/fuel/app/').DIRECTORY_SEPARATOR);
  32. /**
  33. * Path to the default packages directory.
  34. */
  35. define('PKGPATH', realpath(__DIR__.'/fuel/packages/').DIRECTORY_SEPARATOR);
  36. /**
  37. * The path to the framework core.
  38. */
  39. define('COREPATH', realpath(__DIR__.'/fuel/core/').DIRECTORY_SEPARATOR);
  40. // Get the start time and memory for use later
  41. defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
  42. defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());
  43. // Boot the app
  44. require APPPATH.'bootstrap.php';
  45. Package::load('oil');
  46. // Fire up the command line interfact
  47. Oil\Command::init($_SERVER['argv']);
  48. /* End of file oil */