readdir

From: Date: Fri, 16 May 2003 19:51:33 +0000
Subject: readdir
Groups: php.general 
Request: Send a blank email to php-general+get-147970@lists.php.net to get a copy of this message
Hi, using the code from php.net i am reading the contents of a directory, how can i modify this so it reads the contents of the directory above the current one? <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle); } ?>Thanks for your help

« previous php.general (#147970) next »