image.php 416 B

1234567891011121314151617181920
  1. <?php
  2. function readImg($id){
  3. $returns = array();
  4. $path = "goods-img/" . $id;
  5. $files = scandir($path);
  6. for($i = 0; $i < count($files); $i++){
  7. if($files[$i] != "." && $files[$i] != ".." && strtolower($files[$i]) != "cover.jpg"){
  8. $returns[] = $files[$i];
  9. }
  10. }
  11. return $returns;
  12. }
  13. print_r(readImg(81));
  14. die();
  15. ?>