PHPでディレクトリのファイルをループして一覧する。
foreach (new DirectoryIterator('/path/to/your/dir') as $fileinfo) {
if (!$fileinfo->isDot()) {
$filename = $fileinfo->getFilename();
}
}
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 5 years have passed since last update.
PHPでディレクトリのファイルをループして一覧する。
foreach (new DirectoryIterator('/path/to/your/dir') as $fileinfo) {
if (!$fileinfo->isDot()) {
$filename = $fileinfo->getFilename();
}
}
Register as a new user and use Qiita more conveniently
Go to list of users who liked