Function with file size acquisition unit [ASP]

xiaoxiao2021-03-06  55

<% 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 IFEND Function%> Example in ASP:

<% response.write csize (116598)%>

I.e.

转载请注明原文地址:https://www.9cbs.com/read-115241.html

New Post(0)