Re: Help: Constants
| From: | S.P. Telgenhof Oude Koehorst | Date: | Sat, 29 Jun 2002 15:53:39 +0000 |
| Subject: | Re: Help: Constants | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104494@lists.php.net to get a copy of this message | ||
Thanks alot,
I changed the reporting level. I found it myself later on. Just was a bit to
quick when posting this question.
Sacha Telgenhof
"John Holmes" <holmes072000@charter.net> wrote in message
news:000d01c21f0c$de789bf0$b402a8c0@mango...
> > Maybe it's already discussed here, but PHP is generating errors of
> > undefined
> > constants. These constants are defined in my scripts. Als the
> superglobal
> > $_ENV is empty.
>
> Use quotes when using associative arrays.
>
> $_ENV['something'] rather than $_ENV[something]
>
> The warnings have always been there, PHP 4.2 just defaults to a higher
> error reporting level, so now you notice them. The problem comes from
> PHP looking for a constant called "something" and when it's not found,
> it issues a warning. Then it assumes you meant to use a string and tries
> it that way.
>
> You can adjust the error reporting in PHP.ini or with the
> error_reporting() function.
>
> ---John Holmes...
>