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)
%>
下一篇:在ASP中文本数据的实现