技术救助【急】【在 MapPath 方法的路径参数中指定了无效字符。】Server.MapPath(), ASP 0173 (0x80004005)
在 MapPath 方法的路径参数中指定了无效字符。
/news/admin/sub_upload.asp, 第 68 行
这是上传图片时出现的错误,正不明白了,谁帮帮忙,谢谢了 啊
<!--#include file=\"UPLOAD.INC.asp\" -->
<%
if session(\"aleave\")=\"\" then
response.redirect \"index.asp\"
response.end
end if
%>
<%if session(\"admin\")=\"\" then%>
<style type=\"text/css\">
<style type=\"text/css\">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<link rel=\"stylesheet\" href=\"../include/css.css\" type=\"text/css\">
<style type=\"text/css\">
<!--
body {
background-color: #333333;
}
-->
</style>
对不起,您不是会员,不会进行此项操作!
<%else%>
<%
dim arr(3)
dim upload,file,formname,formpath,icount,filename,fileext,i
set upload=new upload_5xsoft \'\'建立上传对象
formpath=\"../uppic/\" \'图片存放的路径:product目录下的uploadimages文件夹 \'\'在目录后加(/)
\'\'列出所有上传了的文件
for each formname in upload.file
set file=upload.file(formname)
if file.filesize>0 then
if file.filesize>10000000 then
response.write \"<font size=2>图片大小超小了**[<a href=# onclick=history.go(-1)>重新上传</a>]</font>\"
response.end
end if
fileext=lcase(right(file.filename,4))
uploadsuc=false
forum_upload=\"gif,jpg,png\"
forumupload=split(forum_upload,\",\")
for i=0 to ubound(forumupload)
if fileext=\".\"&trim(forumupload(i)) then
uploadsuc=true
exit for
else
uploadsuc=false
end if
next
if uploadsuc=false then
response.write \"<font size=2>文件格式**[<a href=# onclick=history.go(-1)>请重新上传</a>]</font>\"
response.end
end if
end if
filename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&file.filename
if file.filesize>0 then \'\'如果 filesize > 0 说明有文件数据
file.saveas server.mappath(formpath&filename) \'\'保存文件【68行】
\'response.write file.filepath&file.filename&\"(\"&file.filesize&\") => \"&formpath&file.filename&\"上传成功<br>\"
response.write \"<font size=2>上传成功 <a href=# onclick=history.go(-1)>请返回</a>\"
end if
set file=nothing
next
set upload=nothing
response.write \"<script>parent.addNEWS.pic_url.value=\'\"&filename&\"\'</script>\"
%>
<%end if%> |