设为首页
加入收藏
站内地图
旧版入口
当前位置:首页 > 站长学院 > 网络编程 > ASP

一个ASP获取服务器驱动器类型的例子---[摘自ASP实务经典]

作者:佚名 出处:网络转载 时间:11-19 点击:

内容载入中...
<%
Set fs=CreateObject("Scripting.FileSystemObject")
For Each Drive In fs.Drives
    Response.Write "盘符:" & Drive.DriveLetter & "<br>"
    Response.Write "驱动器类型:" & Tran(Drive.DriveType) & "<br>"
Next
Set fs=Nothing

Function Tran(drvtype)
   Select Case drvtype
          Case 0:Tran="设备无法识别"
          Case 1:Tran="软盘驱动器"
          Case 2:Tran="硬盘驱动器"
          Case 3:Tran="网络硬盘驱动器"
          Case 4:Tran="光盘驱动器"
          Case 5:Tran="RAM虚拟磁盘"
   End Select
End Function
%>
收藏本文:
】【打印页面】【推荐给朋友】【关闭窗口

站长学院

推荐信息