Page 1 of 1

Undefined Constant Assumed .... ERROR

Posted: Sun Jun 16, 2002 8:03 pm
by dfrancis
When I enter the following:

if(CONSTANT_CONFIG == 1){
return;
}
define("CONSTANT_CONFIG",1);

I get the following error:

Notice: Use of undefined constant CONFIG_CONSTANT - assumed 'CONFIG_CONSTANT' in D:\sites\fileexchange\config.php on line 40
CONFIG_CONSTANT

Anyone with any help?

Posted: Sun Jun 16, 2002 8:18 pm
by volka
you are refering to CONSTANT_CONFIG before it is defined. Of course you get 'Notice: Use of undefined constant ....'
try if defined('CONSTANT_CONFIG') return; instead