see subject line.
TIA.
Printable View
see subject line.
TIA.
If I knew what the Application Object was, perhaps I could help you?
It's used to store variables and objects etc. that can be accessed via any page anytime.
I need something that I can use to store 'settings' for an application in.
Eg:
Database = "DB1"
bgColor = "#COCOCO"
Font = "Verdana, Arial"
...and then access it in any page without having to set the values again.
This confusing?
Similar to autoglobals??
TIA.
...a globally accessable associative array.
it called putting them into a file and using them.
$bgColor = "#COCOCO"
echo"<td bgcoor=".$bgColor.">somedata here </td>";
just like that.
I just make a file, like config.php, and have that file set up an array like:
and then call it on each page:Code:$CONFIG['bgColor'] = 'blah';
$CONFIG['database'] = 'db1';
Code:include 'config.php';
echo $CONFIG['bgColor'];
Thanks Guys! ;)
...But, doesn't it take up a lot of memory having to load the whole page of variables on every page?
Also, is there an easy way to modify those variables via code?
Kind Regards, Dodger.
No, it doesn't take up much memory, unless you have a 1.3tb file (old joke, ignore it).
There would be no way to change it permenantly. You could always change it for the time being, but you'd have to either 1) write over the file with the new values, which would mean you'd have to chmod a few things. or 2) store them in a mysql database and update it as needed.