[Share] code unzip nhanh gọn

Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
code
PHP:
<? $zip = new ZipArchive;
$res =$zip->open("tenfile.zip");
if ($res === TRUE) {$zip->extractTo("giainen/");
$zip->close();echo "Đã giải nén xong";} else {echo "Tập tin bị gì lỗi không giải nén được";}
?>
thay chỗ tên file.zip bằng tên file muốn giải nén vd: abc.zip
khi thành công sẽ hiện giải nén xong rồi
 
code
PHP:
<? $zip = new ZipArchive;
$res =$zip->open("tenfile.zip");
if ($res === TRUE) {$zip->extractTo("giainen/");
$zip->close();echo "Đã giải nén xong";} else {echo "Tập tin bị gì lỗi không giải nén được";}
?>
thay chỗ tên file.zip bằng tên file muốn giải nén vd: abc.zip
khi thành công sẽ hiện giải nén xong rồi

khong hieu cho lam nak admin
 
Thank,hieu roi hi
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
519
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
8
Views
6K
hideonair
hideonair
Admin
Replies
3
Views
13K
AdminAdmin is verified member.
Admin
Admin
Replies
9
Views
14K
dinhluc1194
D
Npnken
Replies
3
Views
4K
AdminAdmin is verified member.
Admin
SuperTroll
Replies
0
Views
2K
SuperTroll
SuperTroll
Back
Top