<html> <head> <title>ThaiCreate.Com PHP Zip</title> </head> <body> <?php $ZipName = "MyFiles/MyZip.zip"; require_once("dZip.inc.php"); // include Class $zip = new dZip($ZipName); // New Class $zip->addFile("thaicreate1.txt", "thaicreate1.txt"); // Source,Destination $zip->addFile("thaicreate2.txt", "thaicreate2.txt"); $zip->addDir("MySub"); // Add Folder $zip->addFile("thaicreate3.txt", "MySub/thaicreate3.txt"); // Add file to Sub $zip->addFile("thaicreate4.txt", "MySub/thaicreate4.txt"); $zip->save(); echo "Zip Successful Click <a href=$ZipName>here</a> to Download"; ?> </body> </html>
<?php $zip = new ZipArchive(); $zip_status = $zip->open("test.zip"); if ($zip_status === true) { if ($zip->setPassword("MySecretPassword")) { if (!$zip->extractTo(__DIR__)) echo "Extraction failed (wrong password?)"; } $zip->close(); } else { die("Failed opening archive: ". @$zip->getStatusString() . " (code: ". $zip_status .")"); } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง