?
Ce document utilise Manuel du site Web PHP chinois Libérer
DriveLetter 屬性返回標(biāo)識(shí)本地驅(qū)動(dòng)器或網(wǎng)絡(luò)共享的大寫字母(驅(qū)動(dòng)器號(hào))。
注意:如果指定的驅(qū)動(dòng)器沒有與驅(qū)動(dòng)器號(hào)相關(guān)聯(lián)(例如,一個(gè)網(wǎng)絡(luò)共享未映射驅(qū)動(dòng)器號(hào)),則 DriveLetter 屬性返回零長度字符串 ("")。
DriveObject.DriveLetter
<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:")
Response.Write("The drive letter is: " & d.driveletter)
set d=nothing
set fs=nothing
%>
輸出:
The drive letter is: C