Sidder lige og kigger på det. (Jeg er ikke den største haj til php :-( ...) Hvordan gør jeg hvis jeg har nogle billeder liggende i: /billeder/rune 18/ ?
Håber I kan hjælpe. Skal jeg have installeret winzip?
Lige et spørgsmål mere. Skal jeg kun bruge den her stump kode:
<?php
$zipfile = new zipfile();
// add the subdirectory ... important!
$zipfile -> add_dir("dir/");
// add the binary data stored in the string 'filedata'
$filedata = "(read your file into $filedata)";
$zipfile -> add_file($filedata, "dir/file.txt");
// the next three lines force an immediate download of the zip file:
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=test.zip");
echo $zipfile -> file();
// OR instead of doing that, you can write out the file to the loca disk like this:
$filename = "output.zip";
$fd = fopen ($filename, "wb");
$out = fwrite ($fd, $zipfile -> file());
fclose ($fd);
// then offer it to the user to download:
<a href="output.zip">Click here to download the new zip file.</a>
?>
Eller skal jeg også bruge alt det andet der står på
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=957&lngWId=8 ??
Er der en der evt kan give mig et eksempel på hvordan det skal se ud?