note 96382 modified in function.ziparchive-addfile by danbrown

From: Date: Wed, 24 Feb 2010 16:29:56 +0000
Subject: note 96382 modified in function.ziparchive-addfile by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166326@lists.php.net to get a copy of this message
It is not obvious, since there are no noticeable examples around, but you can use $localname (second parameter) to define and control file/directory structure inside the zip. Use it if you do not want files to be included with their absolute directory tree. <?php $zip->addFile($abs_path, $relative_path); ?> --was-- It is not obvious, since there are no noticeable examples around, but you can use $localname (second parameter) to define and control file/directory structure inside the zip. Use it if you do not want files to be included with their absolute directory tree. <?php ... $zip->addFile($abs_path, $relative_path); ... ?> http://php.net/manual/en/function.ziparchive-addfile.php

« previous php.notes (#166326) next »