<?php
    function readImg($id){
     $returns = array();
    
     $path = "goods-img/" . $id;
    
     $files = scandir($path);
    
     for($i = 0; $i < count($files); $i++){
      if($files[$i] != "." && $files[$i] != ".."  && strtolower($files[$i]) != "cover.jpg"){
       $returns[] = $files[$i];
      }
     }
    
     return $returns;
    }
    
    print_r(readImg(81));
    die();
?>