Re: Download the whole directory

From: Date: Sun, 21 Oct 2001 17:47:56 +0000
Subject: Re: Download the whole directory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71749@lists.php.net to get a copy of this message
No. You cannot initiate multiple transactions that way (at least not without considerable glue outside of PHP, such as JavaScript etc to cause the browser to initiate multiple transactions; but it cannot be done directly from the server side as the client only asked for one file). You could zip or tar the directory up and send it to the client in one file, one transaction. Mark Lo wrote: > > Hi, > > I know I can use the following code to download a single file, but how > can I download the whole directory by using the following code. Please > help.. (I am using PHP & Apache) > > <?php > Header("Content-disposition: attachment; filename=\"Quickstep.doc\""); > Header("Content-type: application/download"); > readfile($path/Quickstep.doc'); > ?> > > Thank you > > Mark

« previous php.general (#71749) next »