From: Jimmy H. <ji...@ha...> - 2001-07-10 15:52:04
|
Hi, Typically I have some code that are executed on *every* page. An example of this would be to connect to a database. I normally put them in an 'include' file and include it in all the other pages. Where would be the right place to have this "initialisation" code? I am thinking of putting it in a module, and call that module on every page, then just make a global var for the db handle e.g. global $db; and have my other modules access this $db. I somehow feel that this is not the right way to do it.... Please give me a hint thanks |