为什么上传不了,数据库url还乱码
<!--#include file="../conn.asp" -->
<!--#include file="seeion.asp"-->
<!--#include file="../inc/upload.inc"--> /table>
</body>
</html>
<%
if Request.QueryString("act")="ok" then
set rs=server.createobject("adodb.recordset")
sql="select * from download"
rs.open sql,conn,1,3
title=request.form("title")
ly=request.form("ly")
zz=request.form("zz")
body=request.form("body")
url="..\upload\"&Trim(Request.Form("file1"))
'''''
dim upload,file,formName,formPath
set upload=new upload_5xSoft ''''建立上传对象
formPath=upload.form("filepath") ''''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
for each formName in upload.file ''''列出所有上传了的文件
set file=upload.file(formName) ''''生成一个文件对象
if file.FileSize>0 then ''''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath("..\upload\"&file.FileName) ''''保存文件
end if
set file=nothing
next
set upload=nothing
''''
if title="" then
response.Write("<script language=javascript>alert('下载名称不能为空!');history.go(-1)</script>")
response.end
end if
if url="" then
response.Write("<script language=javascript>alert('下载地址不能为空!');history.go(-1)</script>")
response.end
end if
if body="" then
response.Write("<script language=javascript>alert('内容不能为空!');history.go(-1)</script>")
response.end
end if
rs.addnew
rs("title")=title
rs("ly")=ly
rs("zz")=zz
rs("body")=body
rs("url")=url
rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
Response.Write "<script>alert('恭喜你,下载资源增加成功,点击继续添加!');window.location.href='add_download.asp';</script>"
end if
%>
回复 更多评论