[#1]
tahazit dot co dot il at gmail dot com [2014-11-28 01:25:08]
On PHP >5.4, This function will create a file, not a directory.
For instance:
$zip->addEmptyDir ( 'path/to/dir/' );
will create the folders "path/", and "path/to/", and a dummy 0-byte file named "dir" in the latter.
If then we add a file to that dir, say like this:
$zip->addFromString ( 'path/to/dir/file.txt', $data );
the result will be a SEPARATE folder named "dir" next to the dummy "dir" file. The "dir" folder will contain the file "file.txt".
This was tested on an APACHE server running PHP 5.4