SONTHACH.XTGEM.COM
Home | UpLoad | Forum
Bay gio la 03:08:12 Ngay 11/05/24
Code unzip file v0.1 mod by kehuydietso1
Code chạy tốt trên các host Linux, điển hình là Hostgator ;)'; } else { $this_dir = dirname(__FILE__); if(!empty($_POST) && $_POST['extract'] == 'true' && !empty($_POST['zipfile']) && !empty($_POST['extractto'])) { if(!is_dir($_POST['extractto'])) { mkdir_recursive($_POST['extractto']); } $get_zip_file = $_POST['fullpath'] == 'true' ? $_POST['zipfile'] : $this_dir . '/' . $_POST['zipfile']; if(zipExtract ($get_zip_file, $_POST['extractto'])) { echo '

Unzip thành công mỹ mãn roài nhá!

'; echo 'CHÚ Ý: Bạn nên xóa hay đổi tên file zipextractor.php sau khi làm việc xong và có thể xóa file ' . $_POST['zipfile'] . ' nếu muốn!'; } else { echo "Lỗi khi giải nén file!
"; } } else { $autofound = false; if($handle = opendir($this_dir) ) { echo "

Danh sách các file *.zip nhận diện được!

"; while(false !== ($file = readdir($handle))){ if( isZip($file) ) { $autofound = true; echo '
'; echo ''; echo ''; echo ''; echo '' . $file . '   Giải nén đến: '; echo '

'; } } } if(!$autofound) { echo '

Không tìm thấy tập tin *.zip nào trong ' . $this_dir .'. Vui lòng chọn lại đường dẫn đến thư mục chứa file *.zip của bạn!

'; echo '
'; echo ''; echo ''; echo 'Tên file *.zip trong tất cả PATH:     Giải nén đến: '; echo '

'; } } } function zipExtract ($src, $dest) { $zip = new ZipArchive(); if ($zip->open($src)===true) { $zip->extractTo($dest); $zip->close(); return true; } return false; } function isZip ($src) { $get_ext = strrchr(strtolower($src), '.'); $allowed_ext = array('.zip'); if(in_array($get_ext, $allowed_ext)) { return true; } else { return false; } } function mkdir_recursive($pathname) { is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname)); return is_dir($pathname) || @mkdir($pathname); } ?>
Code by kehuydietso1
Trang Chủ | <<Quay Lại
Tags: sonthach.us/zipextractor.php
[SEO] Bạn đến từ:
Trang Chủ | <<Quay Lại
countreg.com
Email: sonthach.nhum@gmail.com
© Copyright Mr.Thach
Powered by XtGem.com
[SEO] Bạn đến từ:

Old school Swatch Watches