scandirList files and directories inside the specified path Description
arrayfalse scandir(string
$directory , int $sorting_order = SCANDIR_SORT_ASCENDING , resourcenull $context = null )
Returns an array of files and directories from the
Parameters
Return Values
Returns an array of filenames on success, or Changelog
Examples
Example #1 A simple scandir example
The above example will output something similar to: Array ( [0] => . [1] => .. [2] => bar.php [3] => foo.txt [4] => somedir ) Array ( [0] => somedir [1] => foo.txt [2] => bar.php [3] => .. [4] => . ) NotesTip
A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide. See Also
|