scandir
scandir — List files and directories inside the specified path.Description
scandir( string $directory,Returns an array of files and directories from the directory.
int $sorting_order = SCANDIR_SORT_ASCENDING,
?resource $context = null ): array|false
Parameters
directory
The directory name
sorting_order
By default, the sorted order is alphabetical in ascending order. If the optional sorting_order is set to SCANDIR_SORT_DESCENDING, then the sort order is alphabetical in descending order. If it is set to SCANDIR_SORT_NONE then the result is unsorted.
context
For a description of the context parameter, refer to the streams section of the manual. If it is specified, then the context is passed to the stream_opendir function.
Return Values
Returns an array of filenames on success, or false on failure. If directory is not a directory, then boolean false is returned, and an error of level E_WARNING is generated.More information about scandir on official PHP documentation site
scandir - Popular snippets
- PHP 8.0 / MySQL 5.7 scandir printf
last run:
2022-01-16 14:58:24
3
- PHP 8.0 / MySQL 5.7 scandir is_dir printf
last run:
2022-01-16 15:05:53
2
- PHP 8.0 / MySQL 5.7 scandir printf
last run:
2022-01-16 15:06:00
2
- PHP 8.0 / MySQL 5.7 scandir is_dir printf
last run:
2022-01-16 15:06:07
2
- PHP 8.0 / MySQL 5.7 print_r scandir
last run:
2022-01-16 15:01:49
2
- PHP 8.0 / MySQL 5.7 printf scandir
last run:
2022-01-16 15:00:08
2
- PHP 8.0 / MySQL 5.7 scandir
last run:
2022-01-16 15:00:19
2
- PHP 8.0 / MySQL 5.7 file_get_contents file_put_contents print_r scandir posix_getgrgid
last run:
2021-12-16 16:57:40
2
- PHP 8.0 / MySQL 5.7 file_get_contents file_put_contents print_r scandir
last run:
2021-12-16 14:43:43
2
- PHP 8.0 / MySQL 5.7 array_diff scandir is_dir unlink rmdir var_dump
last run:
2022-04-20 09:49:52
1
scandir - New snippets
-
PHP 8.0 / MySQL 5.7 array_diff scandir is_dir unlink rmdir var_dump
added at:
2022-04-20 09:49:52
1
-
PHP 8.0 / MySQL 5.7 array_diff scandir is_dir unlink rmdir var_dump
added at:
2022-04-20 09:49:48
1
-
PHP 8.0 / MySQL 5.7 array_diff scandir is_dir unlink rmdir var_dump
added at:
2022-04-20 09:49:32
1
-
PHP 8.0 / MySQL 5.7 scandir is_dir printf
added at:
2022-01-16 15:04:40
2
-
PHP 8.0 / MySQL 5.7 scandir printf
added at:
2022-01-16 15:03:54
2
-
PHP 8.0 / MySQL 5.7 scandir is_dir printf
added at:
2022-01-16 15:03:12
2
-
PHP 8.0 / MySQL 5.7 scandir is_dir printf
added at:
2022-01-16 15:03:06
1
-
PHP 8.0 / MySQL 5.7 scandir is_dir printf
added at:
2022-01-16 15:02:15
1
-
PHP 8.0 / MySQL 5.7 print_r scandir
added at:
2022-01-16 15:00:33
2
-
PHP 8.0 / MySQL 5.7 scandir printf
added at:
2022-01-16 14:58:56
1