Sherida van den Bent Sherida van den Bent - 4 months ago 58
PHP Question

PHP: undefined constant while defining it

I'm getting the following error in PHP:

Notice: Use of undefined constant CONSTANT

on the exact line where I define it:

define(CONSTANT, true);

What am I doing wrong? I defined it, so why does it say "Undefined constant"?


You need to quote the string which becomes a constant

define('CONSTANT', true);