(在线等待)请各位来帮我看看这段程序?
hnclg 2002-03-19 04:57:17 我在网上找了一个上传文件的程序,为什么upload.asp运行到第三行时出错?程序如下:
upload.htm
<html><title>example</title>
<body>
<form name="form1" method="post" action="upload.asp" enctype="multipart/form-data">
<input type=file name="file1">
<input type=submit name="submit" value="提交">
</form>
</body>
</html>
upload.asp
<html><title>example</title>
<body>
<!--#include FILE="upload_5xsoft.inc"-->
<%
set upload=new upload_5xsoft
set file=upload.file("file1")
if file.fileSize>0 then
file.saveAs Server.mappath("temp.jpg")
response.write "<br>上传文件:"&file.FileName&" => temp.jpg OK!"
response.write "<br>文件大小:"&file.FileSize
set file=nothing
end if
set upload=nothing
%></body>
</html>