Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have a small script which zips files and makes it available for being downloaded to clients computer.
The snipped of the code which zips the files and makes if available for download isCode: Select all
<?
$zfiles = "file1 file2 file3 file4 ... file50" =>files to be downloaded
header('Content-type: application/zip');
header('Content-Disposition: attachment;filename=images.zip');
$zipfiles = "/usr/local/bin/zip - ". $zfiles;
$handle = popen ($zipfiles, 'r');
fpassthru($handle);
?>Appreciate if anybody can help me in this regards. Is there any option which needs to be set while zipping the files to make the zip file compatible with windows.start of central directory not found, zip file corrupt.
Thanks,
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]