I once heard it’s good to have one class with all your application constants so that you have only one location with all your constants.
I Tried to do it this way:
class constants{ define('EH_MAILER',1); }
and
class constants{ const EH_MAILER =1; }
But both ways it doesn’t work. Any suggestions?
In the current version of PHP this is the way to do it:
http://www.php.net/manual/en/language.oop5.constants.php
Starting with PHP 5.3 there’s better way to do it. Namespaces.
consts.php
other.php