phpbar.de logo

Mailinglisten-Archive

[php] packen server-side

[php] packen server-side

Jens Kohl j.kohl_(at)_milchundzucker.de
Wed, 26 Jul 2000 11:13:47 +0200


> $download = sprintf("%s.zip", $auth->auth["uname"]);
> $filename = sprintf("../tmp/%s", $download);
> 
> $execstring = sprintf("zip -9 -j %s ", $filename);
> 
>  $db = new DB_BLABLA;
> 
>  $query = sprintf( "select * from auswahl where kunden_id = '%s'",
> $auth->auth["uid"]);
>  $db->query($query);
> 
>  while ($db->next_record())
>  {
>     $execstring = $execstring . "../highend/" . $db->f("name") . ".jpg
> ";
>  }
> 
>  exec($execstring);
> }
> 
> header("Content-Type: application/zip-compressed");
> header("Content-Disposition: inline; filename=\"".$download."\"");
> 
> readfile($filename);

geht das ganze auch unter Windows? Apache mit PHP4 als Modul (php4.0.2-dev)



php::bar PHP Wiki   -   Listenarchive