首页 > 学院 > 编程设计 > 正文

如何获知并显示文件的大小?

2020-06-19 13:51:04
字体:
来源:转载
供稿:网友

<%

Set MyFileSize = Server.CreateObject ("Scripting.FileSystemObject")

MyPath = Server.MapPath("/somedirectory")

Set MyFolder = MyFileSize.GetFolder(MyPath)

%>

<p><% =MyPath %> is <% =MyFolder.Size %> bytes</p>

 

    我们可以看到显示的样式如:Shenzhaoyang/Chunfeng/somedirectory is 66093625 bytes

[1]

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表