实例:
把下面文件另存为mofei.asp文件,运行即可,要FSO支持.
<%
Function fsofiledatemofei(sfile)
'通过FSO得到文件的时间,类型,大小;sfile是文件名
'制作:默飞
'QQ:33224360
'HOME: http://www.8vb.cn
sfilere=""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if sfile="" or isnull(sfile) then sfile=Request.ServerVariables("SCRIPT_NAME")
if not fso.FileExists(server.Mappath(sfile)) then sfile=Request.ServerVariables("SCRIPT_NAME")
sfile=server.Mappath(sfile)
Set fsofile=fso.getfile(sfile)
sfilere=sfilere&fsofile.DateLastModified '文件时间
sfilere=sfilere&chr(9)&"<font color=green>"&fsofile.type&"</font>" '类型
sfilere=sfilere&chr(9)&round(fsofile.size*1000/1024/1000,2)&" KB" '大小
set fso=nothing
fsofiledatemofei=sfilere
End Function
response.write fsofiledatemofei("index.asp")
%>
很明显,修改"index.asp",改成你需要的文件,即可判断,都有注释,自己修改吧.
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- 《黑神话:悟空》攻击动作致敬《大话西游》:这也太帅了!
- 《星舰铳犬太阳系物语》游戏背景介绍
- 《战锤40K星际战士2》终极版有后续DLC说明
- 《第9层》游戏特色玩法介绍
- 刀郎.2006-刀郎【九雨天下】【WAV+CUE】
- 59.9高校生.1994-素兰万岁【上华】【WAV+CUE】
- ECHO.1991-你是爱我还是需要我(国专)【EMI百代】【WAV+CUE】
- 交错战线零课主线困难通关阵容推荐一览
- 交错战线挖掘矿场角色推荐攻略
- 命运圣契公测平民阵容怎么搭配 新手开荒平民阵容攻略
- 金梅《现代发烧的声音2》发烧碟[WAV+CUE]
- 雨果唱片-《历史录音珍藏系列-现代芭蕾舞剧·红色娘子军》2CD【WAV】
- [雨果唱片]李冰《地方民歌·戏曲系列-爱的颂歌》WAV
- 《模拟人生》真人电影官宣!玛格特·罗比担任制片人
- 《星战绝地》系列玩家数超4000万!续作表现超预期