Created
March 14, 2017 07:24
-
-
Save eriweb/682f23ce736a12285c1bba156a72223b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Craft web bootstrap file | |
*/ | |
// Set the Craft site variable | |
define('CRAFT_SITE', 'blabla'); | |
// Project root path | |
$root = dirname(__DIR__); | |
// Composer autoloader | |
require_once $root.'/vendor/autoload.php'; | |
// dotenv? | |
if (file_exists($root.'/.env')) { | |
$dotenv = new Dotenv\Dotenv($root); | |
$dotenv->load(); | |
} | |
// Craft | |
define('CRAFT_BASE_PATH', $root); | |
$app = require $root.'/vendor/craftcms/cms/bootstrap/web.php'; | |
$app->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment