i cannot upload a file in my local server from IE.
code for html page
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print <<html1;
<html>
<body>
<form action="
http://192.168.0.95/httpd/html/guest4/file_upload.pl" method="post" enctype="multipart/form-data">
<input type="file" name="photo">
<input type="submit" value="submit">
</form>
</body>
</html>
html1
--------------------------------------------------------------------
code for uploading
#!/usr/bin/perl -w
use CGI;
$upload_dir = "
http://192.168.0.95/httpd/html/guest4";
$query = new CGI;
$filename = $query->param("photo");
$filename =~ s/.*[\/\\](.*)/$1/;
$upload_filehandle = $query->upload("photo");
open UPLOADFILE, ">$upload_dir/$filename";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print "Content-type: text/html\n\n";
print $query->header ( );
print <<END_HTML;
<html>
<HEAD>
<TITLE>Thanks!</TITLE>
</HEAD>
<BODY>
<P>Thanks for uploading your photo!</P>
<P>Your photo:</P>
<img src="
http://192.168.0.95/httpd/html/guest4/$filename" border="0">
</BODY>
</HTML>
END_HTML