Re: Discussion of method -- config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 8:07 AM -0400 6/20/08, Al wrote:
I freely use defined constants for all fixed variables in my config file.

It insures they cannot be inadvertently reassigned by a function someplace and are available everywhere.

define('MYSQL_HOST',"localhost");


Constants are a good solution for this, but I hate UPPERCASE (I'm not postal). :-)

I may go against convention and use lowercase and start constants with an underscore, something like this:

define('_dbname', 'subscribers');

After all, variables start with a "$", so why can't constants start with "_ "? That seems kind of symmetrical to me.

Opinions, possible problems, advice?

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux