@php
$count_img = 0;
$dir = '../ScreenRecord';
$str = '';
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
// dd(readdir($dh));
while (($file = readdir($dh)) !== false) {
$pic = explode('_',$file);
if($pic[0]==$case->case_id){
if(substr($file,-3) == "jpg" || substr($file,-3) == "png"){
$count_img++;
}
}
}
closedir($dh);
}
}
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
// $reversed = array_reverse($dh);
$arr = array();
while (($file = readdir($dh)) !== false) {
$pic = explode('_',$file);
if($pic[0]==$case->case_id){
if(substr($file,-3) == "jpg" || substr($file,-3) == "png"){
$arr[] = $file;
}
}
}
$invert = array_reverse($arr);
foreach ($invert as $key) {
$str .= " |