Welcome Guest, Not a member yet? Register   Sign In
new and with some questions :-D
#4

[eluser]narkaT[/eluser]
[quote author="al404" date="1226440274"]- if i need to store some global variable such as the website title ($data[‘title’] = ”$websittitle Welcome”Wink , where should i write them?[/quote]

I would create a file APP/config/application_config.php and add it to theautoload-array in APP/config/autoload.php

application_config.php
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
* MISC
*/
$config['foo'] = 'bar';

?>
just watch out not to overwrite any values in the config.php due to duplcate names Wink

autoload.php
Code:
$autoload['config'] = array('application_config');

and accessing you values:
Code:
$foo = config_item('foo');
// OR
$foo = $this->config->item('foo');


Messages In This Thread
new and with some questions :-D - by El Forum - 11-10-2008, 01:04 PM
new and with some questions :-D - by El Forum - 11-10-2008, 01:48 PM
new and with some questions :-D - by El Forum - 11-11-2008, 09:51 AM
new and with some questions :-D - by El Forum - 11-11-2008, 10:17 AM
new and with some questions :-D - by El Forum - 11-11-2008, 10:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB