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
Configuring project specfic setting
Moderator: General Moderators
Re: Configuring project specfic setting
i got many reply from other forum that, In PHP we cannot maintain singleton object as java can hold a object for entire application. But there are ways to maintain object specific to session.