I have a script that runs fine on an Apache/PHP/Redhat. I use it to upload a single image and display it.

This same script fails on a IIUS/PHP/WindowsNT platform with the following error:

Notice: Undefined variable: imageFile in D:\DATA\WEB\www-dev\Temp\pr.php on line 6

I suspect a configuration problem of some sort but dont know for certain.

The scripts are as follows:

Script 1:

--------------------------------------------------------

<HTML>
<BODY>
<FORM NAME="mainform" METHOD="POST" ACTION="pr.php" ENCTYPE="multipart/form-data">
<INPUT TYPE="file" NAME="imageFile" SIZE="64">
<INPUT TYPE="submit" NAME="submit" VALUE="submit">
</FORM>
</BODY>
</HTML>


------------------------------------------------------------

Script 2:

------------------------------------------------------------

<?
while( list($k,$v) = each($HTTP_POST_VARS) ) {
        eval("\$$k = \"$v\";");     
}
print "IMAGEFILE = '$imageFile'";

$savepath = "myimagefile.jpg";
copy("$imageFile","$savepath") or die("Couldnt copy file '$imageFile' to '$savepath'");


?>

<HTML><BODY> <img src="<?echo "$savepath";?>"> </BODY></HTML>

------------------------------------------------------------

Any help/clue will be greatly apprecitated. Thanks.

Reply via email to