I'm trying to get another framework working inside of CodeIgniter and this other framework has it's own config file. One of the values it needs is the site or base url. I thought I'd simply use CI's base url value from the application/config/config.php file. I've tried two methods:
- Simply use
base_url(). The url helper is being autoloaded. This produces "Fatal error: Call to undefined function base_url()" - Do a
require_once APPPATH . 'config/config.php';, then use$config['base_url']. This method works for using application/config/database.php's database values. But for the base url, I get this error: "Message: Undefined variable: config". I don't understand why it works for database.php but not config.php.
What is the correct way to do this?