Do not want Undefined variable message
| From: | Manisha Sathe | Date: | Mon, 08 Mar 2004 01:57:49 +0000 |
| Subject: | Do not want Undefined variable message | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179715@lists.php.net to get a copy of this message | ||
I have following code
testinclude.php
<%
echo "A $color $fruit"; // A
include 'vars.php';
echo "A $color $fruit"; // A green apple
%>
vars.php
<%
$color = "green";
$fruit = "Apple";
%>
But when i run the testinclude program I always get "Undefined variable
errro on very first line. I know it is because vars are not defined yet, but
i remember last time those warnings never used to come. What setting is
needed in php.ini file ?