Asp学习站欢迎你!

FSO读取网站系统使用空间的大小

来源:ASP学习网 作者:Admin 时间:08-06-03 点击:


 

 

 

<%set fsoSpaceObj=Server.CreateObject("Scripting.FileSystemObject")
sysrootdir=""
if SysRootDir = "" then
SysPath=Server.mappath("/")
else
SysPath=Server.mappath("/" & SysRootDir)
end if
if fsoSpaceObj.FolderExists(SysPath) then
set GetSysSpace=fsoSpaceObj.GetFolder(SysPath)
SysSpace=GetSysSpace.size
if SysSpace=0 then
ShowSysSpace=0
else
SysSpace=SysSpace/1024/1024
ShowSysSpace = formatnumber(SysSpace,2,-1)
end if
else
ShowSysSpace=0
end if
SysPicSize=formatnumber(ShowSysSpace/300*100,2,-1)
%>

 

打印】 【关闭
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 验证码: 验证码 查看所有评论