|
i want to find list of drives in local pc like c: ot d:, if anyone can know function for that php or javascript.
i have tried this javascript cod
<HTML> <HEAD>
<script language=JavaScript>
function ShowAvailableDrives() { document.write(GetDriveList()); }
function GetDriveList() { var fso, s, n, e, x; fso = new ActiveXObject("Scripting.FileSystemObject"); e = new Enumerator(fso.Drives); s = ""; do { x = e.item(); s = s + x.DriveLetter; s += ":- "; if (x.DriveType == 3) n = x.ShareName; else if (x.IsReady) n = x.VolumeName; else n = "[Drive not ready]"; s += n + "<br>"; e.moveNext(); } while (!e.atEnd()); return(s); }
</SCRIPT> </HEAD>
<BODY> <P> <script language=JavaScript> ShowAvailableDrives(); </SCRIPT> </P> </BODY> </HTML>
but it says that automation server can't create object in IE and in firefox it's not working. please tell me if you have any solutions.
|