Re: Undefined variables
| From: | DvDmanDT | Date: | Mon, 16 Jun 2003 16:49:42 +0000 |
| Subject: | Re: Undefined variables | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-20353@lists.php.net to get a copy of this message | ||
It's your PHP.ini... You must set error_reporting to like E_ALL & ~E_NOTICE
or something like that... You might also want to check register_globals,
most likely you want this to be On instead of Off which is default...
"Jorge L." <jlara_garduno@hotmail.com> skrev i meddelandet
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
>