CuDemVN.Wap.Sh
GetSmile.Mobie.In - Diễn đàn chia sẻ Cú đêm Việt Nam
AiChat.Wap.Sh - Diễn đàn Xtgem Việt Nam
HamTruyen.Xtgem.Com - Blog Ham Truyện nơi hội tụ của những tín đồ mê truyện chữ
RoSino18k 26-01-2016 |
Tác dụng của code là khi bạn chạy domain/taptinthumuc.php thì toàn bộ danh sách tập tin và thư mục sẽ ghi lại trong tập tin cudemvn.txt
Tạo tập tin taptinthumuc.php dán code này vào:
<?php
function list_files($directory = '.') {
if ($directory != '.') {
$directory = rtrim($directory, '/').'/';
}
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
$f=fopen("cudemvn.txt","a");
fwrite($f,"Toàn bộ tập tin và thư mục trên host là\n$file\n");
fclose($f);
}
}
closedir($handle);
}
}
list_files();
echo 'Đã duyệt xong. Toàn bộ tập tin và thư mục trên host đã được in ra tại <a href="cudemvn.txt">cudemvn.txt</a>. Xem ngay!';
?>
function list_files($directory = '.') {
if ($directory != '.') {
$directory = rtrim($directory, '/').'/';
}
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
$f=fopen("cudemvn.txt","a");
fwrite($f,"Toàn bộ tập tin và thư mục trên host là\n$file\n");
fclose($f);
}
}
closedir($handle);
}
}
list_files();
echo 'Đã duyệt xong. Toàn bộ tập tin và thư mục trên host đã được in ra tại <a href="cudemvn.txt">cudemvn.txt</a>. Xem ngay!';
?>
Lưu lại là xong!
Chúc các bạn thành công!
Nguồn: TuoiTreIT
↓ Tập tin Đính kèm ↓
Đánh giá: 4.5/ 5, 484 bình chọn
Còn “nhiều” Lắm!