I use pclzip.lib.php to compress files on the server into a zip file. For example, the following code will compress "text.txt" in the data folder and whole "images" folder into a zip file named "file.zip".
Code PHP:<?php include_once('pclzip.lib.php'); $file = new PclZip('file.zip'); $path = $file -> create('data/text.txt,images'); if(!$path) die('Error : ' . $file -> errorInfo(true)); ?>
But the file.zip will also be stored on the server. How to transfer it to the client instantly without store it on the server?








Bookmarks