分类广告


推荐文章

  • 没有找到任何内容!
您当前的位置:中国站长下载网络编程ASP专区 → 文章内容

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

  • 作者:佚名    来源:不详    发布时间:2005-12-31 12:07:01
  • 字体大小:
<%
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
%>