thanx felix,but still now i fetch some problem means i cant see (cant upload) the picture though already i change my url to directory.
Right now my code is as following:For html form
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print <<html1;
<html>
<body>
<form action="file_upload.pl"
method="post" enctype="multipart/form-data">
<input type="file" name="photo">
<input type="submit" value="submit">
</form>
</body>
</html>
html1
///////////////////////////////////////////////////////////////////////////////////////////////
and for file uploading cgi script look like this:
#!/usr/bin/perl -w
use CGI;
$upload_dir = "httpd/html/guest4/load";
$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/load/$filename" border=0'>
</BODY>
</HTML>
END_HTML
plz help felix.