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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to