note 31468 added to ref.dir

From: Date: Wed, 23 Apr 2003 05:07:11 +0000
Subject: note 31468 added to ref.dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-46964@lists.php.net to get a copy of this message
I added the following code to the directory listing code. Explanatory comments inline. ... //running the while loop while ($file = readdir($dir_handle)) { // Protect hidden files from being listed if ($file[0] == '.') { continue; } // Prevent this php script file from showing up if ($file == basename($_SERVER['SCRIPT_FILENAME'])) { continue; } ... } // While ends here -- http://www.php.net/manual/en/ref.dir.php http://master.php.net/manage/user-notes.php?action=edit+31468 http://master.php.net/manage/user-notes.php?action=delete+31468 http://master.php.net/manage/user-notes.php?action=reject+31468

« previous php.notes (#46964) next »