Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. /**
  3. * Craft web bootstrap file
  4. */
  5.  
  6. // Set path constants
  7. define('CRAFT_BASE_PATH', dirname(__DIR__));
  8. define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');
  9.  
  10. // Load Composer's autoloader
  11. require_once CRAFT_VENDOR_PATH.'/autoload.php';
  12.  
  13. // Load dotenv?
  14. if (file_exists(CRAFT_BASE_PATH.'/.env')) {
  15. (new Dotenv\Dotenv(CRAFT_BASE_PATH))->load();
  16. }
  17.  
  18. // Load and run Craft
  19. define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
  20. $app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
  21. $app->run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement