Welcome Guest, Not a member yet? Register   Sign In
Best Practices for Storing "Global" Website Information?
#1

[eluser]Jason McCallister[/eluser]
I'm looking to store some really basic information about the website I am building. My first instinct was to store it in its own MySQL table. However, this information isn't going to change often. So my question is what do you think is the best way to store relatively "static" data in CodeIgniter? Here is the type of information that I would be storing about the website. This code is from a model I created:

Code:
var $website_title   = 'Website Title';
var $website_slogan = 'Website Slogan';
var $website_description    = 'Website Description';
var $website_keywords    = 'keywords';
var $website_stylesheet    = 'link/to/stylesheet';
var $website_jquery    = '/js/jquery-1.2.6.js';
var $website_author    = '[email protected]';
var $website_copyright    = 'Copyright 2008 Website Title';

Obviously most of this information will be called into the <head> section of each page. Does anyone know/have a "more efficient" method, if there is one, to accomplish this task?
#2

[eluser]manilodisan[/eluser]
XML would do ok...http://www.php.net/manual/en/book.domxml.php
#3

[eluser]CI Lee[/eluser]
For our CI apps we have stored that info in an auto loaded config file.

Unless you need to change it often storing it in a file is quick and easy and provides global access.

-Lee
#4

[eluser]Boris Strahija[/eluser]
I'm also using an auto loaded config file, seems best to me.
#5

[eluser]gon[/eluser]
+1 to the config file




Theme © iAndrew 2016 - Forum software by © MyBB