September 2001
Intermediate to advanced
768 pages
32h 45m
English
string readdir(resource_pointer dir_stream) Fetches a single entry from a directory stream that has been opened by opendir() .
Returns:
A single directory entry if dir_stream is a valid directory stream and the last entry in the directory has not been reached; FALSE for all other cases
Description:
readdir() retrieves a single entry from a directory that has been opened by opendir().
Version:
From versions 3.0 and 4.0
Example:
<?php // For PHP3, use: $directory = '.'; $directory = getcwd (); $directory_stream = @ opendir ($directory) or die ("Could not open a directory stream for <i>$directory</i>"); while ($entry = readdir ($directory_stream)) { // Grab the extension of the file ... |
Read now
Unlock full access