ASP网页后台无法上传
下载了一个破解版的ASP源码,现在后台在down.asp(下载)里无法上传图片及文件。在news.asp里确可以上传图片。以下是upload.asp的编码,请高手帮着看看哪里出问题了,谢谢! '============================================================下载图片 sub downpic() if Request.QueryString("submit")="downpic" then uploadpath="/uploadFile/softdown/downpic/" uploadsize="102400" uploadtype="jpg/gif/png/bmp" Set Uprequest=new UpLoadClass Uprequest.SavePath=uploadpath Uprequest.MaxSize=uploadsize*102400 Uprequest.FileType=uploadtype AutoSave=true Uprequest.open if Uprequest.form("file_Err")<>0 then select case Uprequest.form("file_Err") case 1:str="<div style=""padding- :5px;""> <font color=blue>上传不成功!文件超过"&uploadsize&"k [<a href='j (-1)'>重新上传</a>]</font></div>" case 2:str="<div style=""padding- :5px;""> <font color=blue>上传不成功!文件格式不对 [<a href='j (-1)']>重新上传</a>]</font></div>" case 3:str="<div style=""padding- :5px;""> <font color=blue>上传不成功!文件太大且格式不对 [<a href='j (-1)'>重新上传</a>]</font></div>" end select response.write str else response.write "<script language=""javascript"">parent.form1.showpic.value='"&Uprequest.SavePath&Uprequest.Form("file")&"';" response.write "</script>" response.write "<div style=""padding- :5px;""> <font color=red>文件上传成功</font> [<a href='j (-1)'>重新上传</a>]</div>" end if Set Uprequest=nothing end if response.write "<form name=form action=?action=downpic&submit=downpic method=post enctype=multipart/form-data>" response.write "<input type=file name=file class='tx' size='20'> " response.write "<input type=submit name=submit value=上传 class=""tx1"">" response.write "</form>" end sub
查看目录是否有读写权限,查看UpLoadClass 类是否完整。
问:上传图片怎么上传在漂流的拍的图片啊,他老是说文件格式不对
答:在飘流里拍的图片都是.bmp的格式,图片占用空间都很大,可能超出了这里规定上传的大小。 建议用“画图”等图像处理软件,把图片另存为.jpg格式的,就可以上传到这...详情>>