有人知道这样才能查出我的FTP空间已经用了多少的方法吗???
把这文件放在根目录下即可
<%
set fsoobj=server.CreateObject("Scripting.FileSystemObject")
dPath = server.MapPath("./")
set dDir = fsoObj.GetFolder(dPath)
function cSize(tSize)
if tSize>=1073741824 then
cSize=int((tSize/1073741824)*1000)/1000 & " GB"
elseif tSize>=1048576 then
cSize=int((tSize/1048576)*1000)/1000 & " MB"
elseif tSize>=1024 then
cSize=int((tSize/1024)*1000)/1000 & " KB"
else
cSize=tSize & "B"
end if
end function
Response.write cSize(dDir.Size)
%>