b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

asp文件二次上传漏洞_asp漏洞 admin editor_表单多文件上传(3)

电脑杂谈  发布时间:2017-06-15 07:02:50  来源:网络整理

If blnAllow=true then ‘只允许上传指定的文件

return = false

for i=0 to UBound(arrExt)

If sFileExt=arrExt(i) then return=true

next

’response.write “Ext: “&sFileExt & ” return: ” & return & ” ”

else ’禁止上传指定的文件

return = true

for i=0 to UBound(arrExt)

If sFileExt=arrExt(i) then return=false

next

End If

CheckFileExt = return

End Function

’*******************************************************

’作 用: 格式化显示文件大小

’FileSize: 文件大小

’*******************************************************

Function FormatSize(FileSize)

If FileSize<1024 then FormatSize = FileSize & ” Byte”

If FileSize/1024 <1024 And FileSize/1024 > 1 then

FileSize = FileSize/1024

FormatSize=round(FileSize*100)/100 & ” KB”

Elseif FileSize/(1024*1024) > 1 Then

FileSize = FileSize/(1024*1024)

FormatSize = round(FileSize*100)/100 & ” MB”

End If

End function

’*******************************************************

’作 用: 取得文件对应的图标

’函数名: FormatSize(FileSize)

’参 数: FileName 文件名

’返回值: 合法文件返回 True ,否则返回False

’*******************************************************

Function GetFileIcon(FileName)

表单多文件上传_asp文件二次上传漏洞_asp漏洞 admin editor

dim FileExt,Fso1

FileExt = GetFileExt(FileName)

ImgPath= strAdminRoot & ”Style/images/file/” & FileExt & “.gif”

Set Fso1 = Server.CreateObject(“Scripting.FileSystemObject”)

If Fso1.fileExists(server.MapPath(ImgPath))=true then

GetFileIcon= “<img src=”"” & ImgPath & “”">”

else

GetFileIcon= “<img src=”"” & strAdminRoot & “Style/images/file/unknow.gif” & “”">”

End If


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-52876-3.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...