Configuring project specfic setting
Posted: Thu Aug 21, 2008 11:56 am
Hi All,
I need one urgent help.
i am using PHP 5. Currently i am having DataBaseConfig object (an object that contain data base config like username , password , schema and etc..) . At present i am creating a new object and storing in the session for every user who successfully logging IN.
But the point here is , this database config is common to all the user, so my question is, instead of creating new object and storing in user session every time, IS THERE IS ANY WAY THAT, THIS CONFIG OBJECT CAN BE STORED GLOBALLY BUT SPECIFIC TO MY NAME SPACE ?
NOTE : BUT I ALSO HEARD THAT , IT IS NOT ADVISABLE TO GLOBAL VARIABLES....
PLEASE KINDLY HELP IN THIS PROBLEM
Thanks in advance
Regards
S Anand
I need one urgent help.
i am using PHP 5. Currently i am having DataBaseConfig object (an object that contain data base config like username , password , schema and etc..) . At present i am creating a new object and storing in the session for every user who successfully logging IN.
But the point here is , this database config is common to all the user, so my question is, instead of creating new object and storing in user session every time, IS THERE IS ANY WAY THAT, THIS CONFIG OBJECT CAN BE STORED GLOBALLY BUT SPECIFIC TO MY NAME SPACE ?
NOTE : BUT I ALSO HEARD THAT , IT IS NOT ADVISABLE TO GLOBAL VARIABLES....
PLEASE KINDLY HELP IN THIS PROBLEM
Thanks in advance
Regards
S Anand