Create a gist now

Instantly share code, notes, and snippets.

Load config based on Environment in Fuel
/********** 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.
* Set the encoding you would like to use.
Fuel::$encoding = 'UTF-8';
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
// Register the autoloader
// Define your environment here
define('ENV', Fuel::DEVELOPMENT);
// Initialize the framework with the correct config file.
/* End of file bootstrap.php */
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