Re: register_globals and E_ALL error reporting
| From: | Julio Nobrega Trabalhando | Date: | Wed, 13 Mar 2002 14:51:50 +0000 |
| Subject: | Re: register_globals and E_ALL error reporting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88352@lists.php.net to get a copy of this message | ||
DEFINE('DBF_HOST', 'localhost');
When PHP sees DBF_HOST without quotes it thinks it should be a constant.
Even inside define()... just quote it, define still works.
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"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