Re: register_globals and E_ALL error reporting

From: Date: Wed, 13 Mar 2002 14:33:30 +0000
Subject: Re: register_globals and E_ALL error reporting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88351@lists.php.net to get a copy of this message
"Richard Ellerbrock" <richarde@eskom.co.za> wrote in message news:sc8f7d68.032@eskom.co.za... > The following code generates a warning when register_globals=off and > error reporting is set to E_ALL. How do I define the constant in another > way not to generate a warning? This is with php 4.1.1. I use defines > extensively throughout my code and it is making my debugging difficult > through the transition to register_global=off code. > > <?php > > define(DBF_HOST, "localhost"); > > echo DBF_HOST; > > ?> > > Warning: Use of undefined constant DBF_HOST - assumed 'DBF_HOST' in > var/www/html/iptrackdev/test.php on line 3 localhost if (defined("DBF_HOST")) { echo DBF_HOST; } else { echo "DBF_HOST not defined"; }

« previous php.general (#88351) next »