19 lines
445 B
PHP
19 lines
445 B
PHP
|
|
<?php
|
|
class AboutModel {
|
|
|
|
static function getData (){
|
|
$box = [];
|
|
if ($handle = opendir('/home/vitaliy/project/itmo/php_winter_2023/engine/upload')) {
|
|
|
|
while (false !== ($entry = readdir($handle))) {
|
|
$ext = pathinfo($entry, PATHINFO_EXTENSION);
|
|
if ($ext == 'mp3') {
|
|
array_push($box, './upload/'.$entry);
|
|
}
|
|
}
|
|
closedir($handle);
|
|
}
|
|
return $box;
|
|
}
|
|
} |