当前位置:编程问答 > asp >

ASP程序求助:下面的代码是实现照片上传功能的,但是点上传按钮没有用,请高手帮忙!!

问题:<!--#include file="sub/conn.asp"--> <!--#include file="sub/webvar.asp"--> <!--#include file="sub/fun.asp"--> <!--#include file="chkerr.asp"--> <%dim ifphoto if grade<=1 then set rs=Server.CreateObject("ADODB.recordset") rs.open"select count(id) from love_photo where userid="&userid&"",conn,1,1 ifphoto=rs(0) rs.close:set rs=nothing if ifphoto>3 then closeconn Call msg("Sorry!\n\n普通会员最多只能上传3张照片\n\n请到照片管理中心删除部分照片","-1") end if elseif grade=2 or grade=3 then set rs=Server.CreateObject("ADODB.recordset") rs.open"select count(id) from love_photo where userid="&userid&"",conn,1,1 ifphoto=rs(0) rs.close:set rs=nothing if ifphoto>30 then closeconn Call msg("Sorry!\n\n诚信会员、会长最多只能上传30张照片\n\n请到照片管理中心删除部分照片","-1") end if end if %> <!--#include file="sub/uploadinc2.0.asa"--> <!--#include file="sub/photo_picsize.asa"--> <% If Trim(request("Action"))="Upload" then Call UploadData() End If Sub UploadData() Dim upload Server.ScriptTimeOut=999999 set upload=new UpFile_Class ''建立上传对象 Dim ProductId,ClassId,ProductName,ProductSize,SmallPic,SmallPicSize,BigPic,BigPicSize,title,S_Height,S_Width S_Width=100 S_Height=125 Title=Replace(Replace(Replace(upload.form("Title"),"'",""),"<","<"),">",">") if Trim(Title)="" then closeconn:set upload=nothing Call msg("照片说明不能空白!请重试。","-1") end if '图片处理 dim file,fileExt,Filesize 'BigPic=UserID'用户ID BigPic=FormatDT(now(), 9)&cdstr(9) set file=upload.file("Pic") FileType=Ucase(file.FileType) fileExt=file.fileExt Filesize=file.FileSize If Filesize>0 then If instr(FileType,"JPEG")<=0 and instr(FileType,"GIF")<=0 Then set file=nothing:set upload=nothing:Closeconn Call msg("错误图片文件格式,必须是 jpg、gif。","-1") End If If Filesize>502400 Then set file=nothing:set upload=nothing:Closeconn Call msg("图片大小已经超出上传范围(500K)。","-1") Else
答案:怎么个没有用??提示出错还是没反应,还是没弄到数据库里??还是不能把上传后的图片地址提交到表单里?各种没有用到底是哪种。

上一个:求一段asp和js代码错误原因
下一个:提供aspjpeg2.0特别版下载和注册码

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,