while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print $query->header ( );
print <<END_HTML;
<HTML>
<HEAD>
<TITLE>Thanks!</TITLE>
</HEAD>
<BODY>
<>Thanks for uploading your photo!</P>
<>Your email address: $email_address</P>
<>Your photo:</P>
<img src="/upload/$filename" border="0">
</BODY>
</HTML>
END_HTML
它们实现的功能很简单:用户上传一个图片,然后在浏览器中显示。
在浏览器中做测试时,html可以正常显示表单,但在点击Submit按钮之后,浏览器显示500错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.0.54 (Fedora) Server at 192.168.0.102 Port 80