9.5 X1 通用
KS_CLS/UploadFunction.asp
- '检查文件内容的是否合法Function CheckFileContent(byval path,byval filesize)dim kk,NoAllowExtArrpath=Replace(path,KS.Setting(2),"")NoAllowExtArr=split(NoAllowExt,"|")for kk=0 to ubound(NoAllowExtArr)if instr(replace(lcase(path),lcase(KS.Setting(2)),""),"." & NoAllowExtArr(kk))<>0 thencall KS.DeleteFile(path)CheckFileContent= "文件上传失败,文件名不合法"Exit Functionend ifNext'if filesize>50 then exit function '超过1000K跳过检测
'if filesize>2000 then exit function '超过2000K跳过检测on error resume nextDim findcontent,regEx,foundtf
官方这里默认是大于50k的文件就不检测了,改为2000K,或更大