老问题重提 上传

agang3321 2003-10-08 10:45:21
服务器挂了 重做 原来是好的 用的 化境编程界HTTP上传程序 Version 1.0
网页无法上传图片 如下错误:
错误类型:
Microsoft VBScript 运行时错误 (0x800A0046)
/sysmanager/yrfc/insert_mx.asp, 第 20 行
代码如下:
<!--#include file="../../include/conn.asp"-->
<!--#include file="../../include/function.asp"-->
<!--#include FILE="../../include/upload.inc"-->
<%
fileFullName=""
set upload=new upload_5xSoft ''建立上传对象
title=upload.form("title")
content=filterstring(upload.form("content"))
name=upload.form("name")
posi=filterstring(upload.form("posi"))
tel=upload.form("tel")
address=filterstring(upload.form("address"))
UserID=upload.form("UserID")
sex=filterstring(upload.form("sex"))
Randomize
tmp = Int(Rnd*100000000) + 1
formPath=Server.mappath("/wlmx/images/"&tmp)
set fo=server.CreateObject("Scripting.FileSystemObject")
if not fo.FolderExists (formPath) then
fo.CreateFolder formPath ^^^^^^^^ 第20行
end if
set fo=nothing
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs formPath&"\"&file.FileName ''保存文件
fileFullName = file.FileName
iCount=iCount+1
end if
if trim(fileFullName)<>"" then
fileFullName=tmp&"/"&fileFullName
end if
set file=nothing
next
set upload=nothing ''删除此对象
if trim(fileFullName)="" then
delPath=Server.mappath("/wlmx/images/"&tmp)
set fo=server.CreateObject("Scripting.FileSystemObject")
if fo.FolderExists (formPath) then
fo.DeleteFolder formPath
end if
set fo=nothing
end if

set Rs=server.CreateObject("adodb.recordset")
sql="insert wlmx_tab2 (name,title,posi,content,photourl,address,tel,UserID,sex) values ('"&name&"','"&title&"','"&posi&"','"&content&"','"&fileFullName&"','"&address&"','"&tel&"','"&UserID&"','"&sex&"')"
Rs.Open sql,connstring,1,1
set Rs=nothing
%>
...全文
28 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
agang3321 2003-10-08
  • 打赏
  • 举报
回复
楼上的能告诉我解决的办法吗
fso 我不是很了解
zorou_fatal 2003-10-08
  • 打赏
  • 举报
回复
fo.CreateFolder formPath
fso的权限问题?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧