note 86139 deleted from function.scandir by thiago

From: Date: Tue, 09 Dec 2008 11:30:57 +0000
Subject: note 86139 deleted from function.scandir by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147946@lists.php.net to get a copy of this message
Note Submitter: Jason ---- http://www.php.net/manual/en/function.scandir.php#80057 This note was very helpful. I was testing my code on a local directory (meaning on my E:/ drive) and I realized that the last slash kept being replaced by a forward slash. I added this bit of code to the "scanDirectories" function which determines if this is a local drive or a internet drive and changes the filename separators. Thanks everyone, I just started using PHP last week (Sept 2008). $count_fwdslash = substr_count($rootDir,'/'); $separator = ($count_fwdslash==0 ? '\\' : '/'); $path = $rootDir.$separator.$content;

« previous php.notes (#147946) next »