风声ASP无组件上传 form("file_Err")报错

l245319872 2013-05-07 10:32:29

if Request.ServerVariables("REQUEST_METHOD") = "POST" then

dim up, fso, filePath
set fso = Server.CreateObject("Scripting.FileSystemObject")
filePath = year(date) & "-" & month(date) & "/" '使用 "年-月" 形式的目录
if not fso.FolderExists(Server.MapPath(UPLOAD_PATH & filePath)) then
fso.CreateFolder(Server.MapPath(UPLOAD_PATH & filePath))
end if

'开始上传
set up = new UploadClass
up.AutoSave = 0 '取无重复的服务器时间字符串为文件名自动保存文件
up.SavePath = UPLOAD_PATH & filePath
up.FileType = "rar/zip/doc/docx/wps"
up.MaxSize = 1024 * 1024 * 10 '最大 10M
up.Open()

if up.Error <> 0 or up.Form("file_Err") <> "" then
Response.Write "<script>alert('上传出错!');</script>"
Response.end
end if
end if

下面是Html代码

<form name="form" class="form" method="post" enctype="multipart/form-data" onsubmit="return check(this);">
<ul>
<li class="field">
<div class="input">
<label for="email">上传简历:</label>
<input name="file" type="file" size="36" maxlength="50" class="file" /> <span style="color:#F00;"> * 支持.doc、.docx、.wps格式文件</span>
</div>
</li>
<li class="submit-field">
<div class="input clearfix"><input type="submit" value="提交" class="btn-submit" /><input type="reset" value="重置" class="btn-reset" /></div>
</li>
</ul>
</form>


检查出来了是因为 up.Form("file_Err") <> "" 这个地方出错了,可是不知道怎么导致的这里出错的

在线急等 分不多,全给了,谢谢了
...全文
93 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,391

社区成员

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

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