Collecting "environment-variables" in a single file |
[eluser]Unknown[/eluser]
Hello guys, in my actual project, I want to centralize a few variables in a file, that I would include in all the code e.g. the project-name (I want to build the code in a way, that allows me to redistribute it in other projects). How would you do this? I think it's not necessary to save them in the database because it takes too much time to ask the database for a couple of simple variables. Should I create a file to store the variables in? And how do I load them in every single request? (Sorry for my english. It could be, that it isn't very good because I'm from germany)
[eluser]pistolPete[/eluser]
Have a look at the config class: http://ellislab.com/codeigniter/user-gui...onfig.html You can create our own config file and autoload it. |
Welcome Guest, Not a member yet? Register Sign In |