Welcome Guest, Not a member yet? Register   Sign In
Environment config files with default values
#1

[eluser]Daniel Cronin[/eluser]
A quick way to load from a default configuration file. Add a value to the default config, and the environment config will use that value unless it is overridden. It would be cool to move this functionality MY_Config.

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

include(APPPATH . 'config/' . pathinfo(__FILE__, PATHINFO_BASENAME));
// include(APPPATH . 'config/defaults/' . pathinfo(__FILE__, PATHINFO_BASENAME));

// I just want to change this variable
$config['base_url'] = 'http://localhost/';




Theme © iAndrew 2016 - Forum software by © MyBB