Re: Re: Undefined variables
| From: | Stephen | Date: | Wed, 02 Jul 2003 11:55:23 +0000 |
| Subject: | Re: Re: Undefined variables | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-20652@lists.php.net to get a copy of this message | ||
Personally, I would use
error_reporting = E_ALL & ~E_NOTICE
instead of E_PARSE; Both will get rid of the annoying "empty variable"
notices, but your solution also gets rid of a number of important error
messages that really are needed. If the website is available to members of
the public, then error messages should go to a log file and not to the
browser, so you will still want to know about problems in your code! (EG:
such as using an array function on a string... using your setting won't tell
you you've made the mistake!)
Stephen
----- Original Message -----
From: "Jupiter Wen" <jiabin3@public.gz.cn>
To: <php-windows@lists.php.net>
Sent: Tuesday, July 01, 2003 5:22 PM
Subject: [PHP-WIN] Re: Undefined variables
> You may edit c:\windows\php.ini, and change
>
> [php]
> error_reporting= E_ALL;
>
> to
>
> [php]
> error_reporting= E_PARSE;
>
> Good luck! :)
>
> Jupiter Wen
>
> "Jorge L." <jlara_garduno@hotmail.com> wrote in message
> news:Sea2-F39en0bcaQUXPX0002ae6e@hotmail.com...
> > I bought a book on PHP, and in one of the examples it declares a
variable
> > without assigning it a variable, then it uses the gettype() method to
show
> > that the result would be "NULL". Well, when I test the script I get the
> > following error:
> >
> > Notice: Undefined variable: testing in C:\Program Files\Apache
> > Group\Apache2\htdocs\test.php on line 7
> >
> > A few months ago I remember that the script would run without a problem
(I
> > had to stop reading it and I picked it up again), but now it seems that
I
> > have to assing a value to variables before I can use them. Is this a
> change
> > from a recent PHP update? I looked at their update section but I can't
> find
> > anything that says this is something new. Or is this something that I
have
> > to set in php.ini?
> >
> > Thanks for your help
> > George
> >
> > _________________________________________________________________
> > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>