note 46340 added to ref.filesystem

From: Date: Thu, 07 Oct 2004 16:18:29 +0000
Subject: note 46340 added to ref.filesystem
Groups: php.notes 
Request: Send a blank email to php-notes+get-78141@lists.php.net to get a copy of this message
After searching all over the place to find a function to do what I wanted, I wrote the following: /* ** Returns an array of valid drives on the system (a:, b:, etc.) */ function getSystemDrives () { // Initialize $aResult = Array (); // Loop from A-Z and try opening the root dir for ($letter = 'A'; $letter <= 'Z'; $letter ++) { if (is_dir ($letter . ":")) $aResult [] = $letter . ":"; } // Return results return ($aResult); } It simply returns an array of valid drives as seen from the server (A:, B:, etc.). This obviously is targeted to Win32 installations only. ---- Manual Page -- http://www.php.net/manual/en/ref.filesystem.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46340 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46340&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46340&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78141) next »