?
本文檔使用 PHP中文網(wǎng)手冊(cè) 發(fā)布
IsReady 屬性返回指定驅(qū)動(dòng)器是否就緒。就緒為 true,未就緒為 false。
注意:對(duì)于可移動(dòng)媒體驅(qū)動(dòng)器和 CD-ROM 驅(qū)動(dòng)器,僅當(dāng)插入相應(yīng)的媒體并準(zhǔn)備接受訪問時(shí),IsReady 返回 True。
DriveObject.IsReady
<%
dim fs,d,n
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("a:")
n = "The " & d.DriveLetter
if d.IsReady=true then
??n=n & " drive is ready!"
else
??n=n & " drive is not ready!"
end if
Response.Write(n)
set d=nothing
set fs=nothing
%>
輸出:
The A drive is not ready!