If your constants don't show up in your included or required files, then you probably have php safe mode turned on!
I ran into this problem, I forgot to turn of safe mode when I was creating a new site.
![]() |
|
||||||||||
|
definedDescriptionbool defined ( string name )
Returns TRUE if the named constant given by
See also define(), constant(), get_defined_constants(), function_exists(), and the section on Constants. defined
Joel
20-Aug-2007 05:35
If your constants don't show up in your included or required files, then you probably have php safe mode turned on!
Harald Ponce de Leon
18-May-2006 08:24
Beware that some PHP versions return an integer (1 or 0) instead of a boolean.
ndove at cox dot net
27-Jan-2005 07:20
In PHP5, you can actually use defined() to see if an object constant has been defined, like so:
Craig at chatspike dot net
30-Nov-2003 11:57
This can be useful if you want to protect pages which get included from outsiders eyes, on your mail page (the page viewable by people) put define("X", null); then on all your other pages, you can then do something like: |