[eluser]cinewbie81[/eluser]
[quote author="thurting" date="1193050783"]I don't really know what you are trying to accomplish with that class, but it doesn't look like it should be a subclass of Controller. In any case, if you want to define a global constant you should check out the define() function which is native to PHP. You could also define your global variables as static properties of a class. I would suggest coding in PHP5 if you were going to go this route. For example, you could create a class (GlobalSettings) with a static property (db) and access it via GlobalSettings::db. Depending on your application, you may want to make that class a singleton. You could also store your variables in SESSION, but you probably wouldn't want to do that.[/quote]
I hope i got what u mean ..
DO u mean create a class call GlobalSettings without extend from anything (not controller, model etc) like following:
Class GlobalSettings()
{
// Declare my variable here
}
Where should i put this file ? Under controller folder ?
And how can i call it from other controller class ?
Sorry I'm quite new to php

Some sample code will be appreciated thx