永发信息网

如果问题解决了给补50分以上,这段asp代码运行时113行出错,大家帮我看看

答案:2  悬赏:80  手机版
解决时间 2021-02-23 15:34
运行时出现的错误提示是下面的

Microsoft VBScript 运行时错误 '800a004c'

路径未找到

\upfile.asp, line 113

这段是上传文件时用的
代码是
<%
Const MaxFileSize=200000 '上传文件大小限制
Const UpFileType="gif|jpg|bmp|png" '允许的上传文件类型
Const DelUpFiles="Yes" '删除文章时是否同时删除文章中的上传文件
%>
<!--#include file="upfile_class.asp"-->
<%
const upload_type=0 '上传方法:0=无惧无组件上传类,1=FSO上传 2=lyfupload,3=aspupload,4=chinaaspupload

dim upload,file,formName,SavePath,filename,fileExt
dim upNum
dim EnableUpload
dim Forumupload
dim ranNum
dim uploadfiletype
dim msg,founderr
msg=""
founderr=false
EnableUpload=false
SavePath = "/uptupian/pinke" '存放上传文件的目录
if right(SavePath,1)<>"/" then SavePath=SavePath&"/" '在目录后加(/)
%>
<%
ComeinSTR=lcase(request.servervariables("HTTP_HOST"))
Url=split(ComeinSTR)
yourthing=Url(0)
%>
<html>
<head>
<style>
td{font-size:9pt;line-height:160%}
body{
font-size:9pt;
line-height:160%;
margin-left: 5px;
margin-top: 2px;
}
a:link { color: #0033CC; text-decoration: none }
a:visited { color: #0033CC; text-decoration: none }
a:active { color: #FF0000; text-decoration: none }
a:hover { color: #000000; text-decoration: underline}
</style>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body bgcolor="#FFFFFF">
<%
if EnableUploadFile="NO" then
response.write "系统未开放文件上传功能"
else
select case upload_type
case 0
call upload_0() '使用化境无组件上传类
case else
'response.write "本系统未开放插件功能"
'response.end
end select
end if
%>
</body>
</html>
<%
sub upload_0() '使用化境无组件上传类
set upload=new upfile_class ''建立上传对象
upload.GetData(104857600) '取得上传数据,限制最大上传100M
if upload.err > 0 then '如果出错
select case upload.err
case 1
response.write "请先选择你要上传的文件!"
case 2
response.write "你上传的文件总大小超出了最大限制(100M)"
end select
response.end
end if

for each formName in upload.file '列出所有上传了的文件
EnableUpload=False
set ofile=upload.file(formName) '生成一个文件对象
oFileSize=ofile.filesize
if oFileSize<100 then
msg="请先选择你要上传的文件!"
FoundErr=True
elseif ofilesize>(MaxFileSize*1024) then
msg="文件大小超过了限制,最大只能上传" & CStr(MaxFileSize) & "K的文件!"
FoundErr=true
end if

fileExt=lcase(ofile.FileExt)
arrUpFileType=split(UpFileType,"|")
for i=0 to ubound(arrUpFileType)
if fileEXT=trim(arrUpFileType(i)) then
EnableUpload=true
exit for
end if
next

if fileEXT="asp" or fileEXT="asa" or fileEXT="aspx" or fileEXT="cer" or fileEXT="cdx" then
EnableUpload=false
end if
if EnableUpload=false then
msg="这种文件类型不允许上传!\n\n只允许上传这几种文件类型:" & UpFileType
FoundErr=true
end if
strJS="<SCRIPT language=javascript>" & vbcrlf
if FoundErr<>true then
randomize
ranNum=int(900*rnd)+100
filename=SavePath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
ofile.SaveToFile Server.mappath(FileName) '保存文件
whichfile=server.mappath(""& fileName & "")
Set fso = CreateObject("Scripting.FileSystemObject")
set thisfile=fso.opentextfile(whichfile)'(就是这一行出错了,帮忙看看)
my_string=thisfile.readall
if instr(LCase(my_string),"<%")<>0 or instr(LCase(my_string),"<%")<>0 or instr(LCase(my_string),"Request")<>0 or instr(LCase(my_string),"Session")<>0 or instr(LCase(my_string),"script")<>0 then
dim muma
muma=1
最佳答案
"/uptupian/pinke" '存放上传文件的目录
这个文件夹有吗?
如果你的网站根是wwwroot
那么这个件夹是wwwroot/uptupian/pinke
而不是wwwroot/其它/uptupian/pinke
不知道你能不能看懂~
全部回答
搜一下:如果问题解决了给补50分以上,这段asp代码运行时113行出错,大家帮我看看
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
神舟五号飞船怎么画
参数方程x=1-t^2,y=t-^3的图像怎么画啊?
学习分数乘法
在这个网红霸屏的时代,留学到底还值不值得
日本话是又闽南话改过去的吗
有滋有味大排档在哪里啊,我有事要去这个地方
碧蓝航线俾斯麦怎么获得 碧蓝航线俾斯麦获得
左眼上眼皮有痣
我用支付宝购买机票安全吗?
我参加了合作医疗,在北京或其他省市医院住院
川味小炒NO.2我想知道这个在什么地方
应届毕业生怎么在银行办贷款需要哪些条件急1.
网易游戏天谕中,钓鱼渔具在哪里啊
黄金马车牛肉面在哪里啊,我有事要去这个地方
大厅外面有监控器可以看到房间里面吗
推荐资讯
3.7÷1.2=37÷12=3余1对不对
剪吧发艺怎么去啊,有知道地址的么
中老年黄金搭档年轻人能吃吗
U盘内文件看不到了怎么办?占用了内存但看不到
一个水池有甲,乙,丙三个水管,甲,乙是进水管,
魔兽世界看到个8级的人族有坐骑
( )经( )典 括号里的字要近义词
柳州到顺德怎么座车
培生儿童英语dab文件怎么打开
谁有海尔(Haier)电热水器FCD-HM50HI(E)银海
怎样才算高鼻梁
我的双剑愿意为你效劳是lol谁说的
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?