zoukankan      html  css  js  c++  java
  • 一個統計空間使用了多大的sub

    Sub Showspecialspaceinfo(method)
        
    dim fso,d,fc,f1,size,showsize,drvpath        
        
    set fso=server.createobject("Scripting.FileSystemObject")
        drvpath
    =server.mappath("pic")
        drvpath
    =left(drvpath,(instrrev(drvpath,"\")-1))
        
    set d=fso.getfolder(drvpath)         
        
        
    if method="All" then         
            size
    =d.size
        
    elseif method="Program" then
            
    set fc=d.Files
            
    for each f1 in fc
                size
    =size+f1.size
            
    next    
        
    end if    
        
        showsize
    =(size)*1.05 & " Byte" 
        
    if size>1024 then
           size
    =(size\1024)*1.035
           showsize
    =size & " KB"
        
    end if
        
    if size>1024 then
           size
    =(size/1024)*1.025
           showsize
    =formatnumber(size,2& " MB"        
        
    end if
        
    if size>1024 then
           size
    =(size/1024)*1.015
           showsize
    =formatnumber(size,2& " GB"       
        
    end if   
        
    set d=nothing 
        
    set fso=nothing   
        response.write 
    "<font color=red>" & showsize & "</font>"
    end sub               

    申明

    非源创博文中的内容均收集自网上,若有侵权之处,请及时联络,我会在第一时间内删除.再次说声抱歉!!!

    博文欢迎转载,但请给出原文连接。

  • 相关阅读:
    请求转发和重定向实现与Ajax实现表单登陆
    jquery学习:
    Ajax一目了然
    EL和JSTL
    jsp(java server pages):java服务器端的页面
    Vue 第二章 自定义修饰符、指令、生命周期函数
    Vue 第一章练习 列表的案例
    Vue 第一章练习 v-for
    第一章 Vue之代码基本结构、插值表达式、事件修饰符
    Vue之父组件传值给子组件
  • 原文地址:https://www.cnblogs.com/Athrun/p/638878.html
Copyright © 2011-2022 走看看