Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Load config based on Environment in Fuel

View bootstrap.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<?php
/********** This is in app/bootstrap.php ************/
// Bootstrap the framework DO NOT edit this
require_once COREPATH.'bootstrap.php';
/**
* Set the timezone to what you need it to be.
*/
date_default_timezone_set('UTC');
/**
* Set the encoding you would like to use.
*/
Fuel::$encoding = 'UTF-8';
Autoloader::add_classes(array(
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
));
// Register the autoloader
Autoloader::register();
// Define your environment here
define('ENV', Fuel::DEVELOPMENT);
// Initialize the framework with the correct config file.
Fuel::init(include(APPPATH.'config/'.ENV.'.php'));
/* End of file bootstrap.php */
View bootstrap.php
1 2 3 4 5
/**
In your config file you would then set the environment to the ENV constant you defined in the bootstrap.
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.