最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp获取文件大小
时间:2022-06-29 13:47:17 编辑:袖梨 来源:一聚教程网
'函数作用:获取文件大小
function getfilesize(filename)
'判断文件名是不是为空
if filename="" then
getfilesize="0kb"
exit function
end if
dim ofso,ofile,sfile
sfile=filename
set ofso=server.createobject("scripting.filesystemobject")
'判断获取文件大小的文件是否存在
if ofso.fileexists(server.mappath(sfile)) then
set ofile=ofso.getfile(server.mappath(sfile))
'判断获取文件大小
getfilesize= cstr( cdbl( formatnumber( ofile.size / 1024))) & "kb"
else
getfilesize="0kb"
exit function
end if
set ofile=nothing
set ofso=nothing
end function
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17