note 128279 added to function.scandir
| From: | arthur dot am dot app at gmail dot com | Date: | Fri, 03 Mar 2023 13:53:37 +0000 |
| Subject: | note 128279 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220236@lists.php.net to get a copy of this message | ||
$path_abs = __DIR__ .'/test/';
if( DIRECTORY_SEPARATOR != substr($path, -1) || (DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR) ==
substr($path, -2))
{
throw new Error("A non-standard path is specified.
{$path}");
}
$scandir_result = scandir( $path, SCANDIR_SORT_DESCENDING );
for( $n = 0, $e = count($scandir_result) - 2; $n < $e; $n++ )
{
echo ($path . $scandir_result[$n]) .'<br/>';
}
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 95.47.248.21)
----
Manual Page -- https://php.net/manual/en/function.scandir.php
Edit -- https://main.php.net/note/edit/128279
Del: integrated -- https://main.php.net/note/delete/128279/integrated
Del: useless -- https://main.php.net/note/delete/128279/useless
Del: bad code -- https://main.php.net/note/delete/128279/bad+code
Del: spam -- https://main.php.net/note/delete/128279/spam
Del: non-english -- https://main.php.net/note/delete/128279/non-english
Del: in docs -- https://main.php.net/note/delete/128279/in+docs
Del: other reasons-- https://main.php.net/note/delete/128279
Reject -- https://main.php.net/note/reject/128279
Search -- https://main.php.net/manage/user-notes.php