note 15838 added to function.opendir
| From: | dpattersonNOSPAM at dplhenterprises dot com | Date: | Thu, 04 Oct 2001 15:50:03 +0000 |
| Subject: | note 15838 added to function.opendir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18568@lists.php.net to get a copy of this message | ||
Regarding having to chdir to the directory (as mentioned by matt@studio77.com on 10-Jan-2001 03:59
and hj@LAMPwriter.com on 12-Apr-2001 12:51)<br>
This is probably due to the fact that the readdir() function returns just file names, not full
specs. The following works fine for me:<br>
$path = "_images/prodnum";
$images = array();
$d = opendir( $path );
while( $f = readdir( $d )) $images[] = $path . $f;
closedir( $d );
--
http://www.php.net/manual/en/function.opendir.php
http://master.php.net/manage/user-notes.php?action=edit+15838
http://master.php.net/manage/user-notes.php?action=delete+15838
http://master.php.net/manage/user-notes.php?action=reject+15838