Đăng kí thành viên · Quên MK?

Lần hoạt động

Diễn đàn | Wap Web | Php - Sql
Tìm kiếm
  2 CODE HIỂN THỊ HẾT FILE TRONG THƯ MỤC CÓ THỂ XẮP XẾP THEO FILE
Admin  Admin [FOUNDER]
 
PRO
(03.01.2019 / 20:17) TOP
PHP CODE :
<?php
$currentDir = getcwd();
$it = new RecursiveDirectoryIterator(“ul/images/”);
$display = Array ( ‘jpg’, ‘png’ );
foreach(new RecursiveIteratorIterator($it) as $file)
{
$quach= explode(‘.’, $file);
if (in_array(strtolower(array_pop($quach)), $display))
echo “<img src=$file </img> <br/>”;
}
?>

///////////////////////////////////////////////////////////////
<?php
$path = realpath(‘uploads/’);
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
echo “$filename</br>”;
}
?>



174 Lượt xem chủ đề  Tổng số: 1 Comment

Cùng chuyên mục
Lọc theo tác giả
Xem chủ để ngoại tuyến (Offline)

Trong diễn đàn

Sắp xếp theo thứ tự từ trên xuống
Forum.GiaiTri321.Info
Trang chủ
0 / 1

DucVuVip.Pro - Diễn Đàn DucVuVip.Pro, Chia Sẻ Code, Thủ Thuật Wap/Webmaster 6.2.1

© Forum.GiaiTri321.Info