Guest User

Untitled

a guest
Sep 25th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. function get_images() {
  2.    $carpeta = get_subtitle();
  3.    $carpeta = DIR_FOTOS . $carpeta;
  4.    if(file_exists($carpeta)) {
  5.        $dir = opendir($carpeta);
  6.    } else {
  7.        $dir = False;
  8.    }
  9.    $html_images = NULL;
  10.    
  11.    if ($dir !== False) {
  12.        while(($imagen = readdir($dir)) !== False) {
  13.            $ruta = DIR_FOTOS . $imagen;
  14.            if(strpos(strtolower($imagen), '.jpg') !== False) {
  15.                $html_images .= render_miniatura("$carpeta/$imagen");
  16.            }
  17.        }
  18.    }
  19.    return $html_images;
  20. }
Add Comment
Please, Sign In to add comment