📜  ASP DriveLetter 属性

📅  最后修改于: 2022-05-13 01:56:38.122000             🧑  作者: Mango

ASP DriveLetter 属性

ASP DriveLetter 属性用于返回定义本地磁盘或网络共享的大写字母。

句法:

DriveObject.DriveLetter

示例:下面的代码说明了 ASP 驱动器号属性。

ASP
<%
dim fs,dr
set fs=Server.CreateObject("Scripting.FileSystemObject")
    
'Getting the drive to be used
set drive=fs.GetDrive("d:")
  
'Getting the drive letter of the drive
Response.Write("Letter of the drive is: " & dr.DriveLetter)
    
set dr=nothing
set fs=nothing
%>


输出:

Letter of the drive is: D