PHP Classes

Directory naming

Recommend this page to a friend!

      Create ZIP File  >  All threads  >  Directory naming  >  (Un) Subscribe thread alerts  
Subject:Directory naming
Summary:How to change output dir name
Messages:1
Author:Yuri80
Date:2010-10-06 09:06:44
 

  1. Directory naming   Reply   Report abuse  
Picture of Yuri80 Yuri80 - 2010-10-06 09:06:52
Hi, for first sorry for my english.

I need to know how to zip a folder with files and subfolders into a zip file but without the entire hierarchy name.

I mean: I would like to zip the folder "../zip/1/project_name" and I write:

$createZipFile->zipDirectory("../zip/1/project_name", "/");

I need to obtain a zip file with the only project_name folder and its files and subdirectories.

Instead I have a zip file with "../zip/1/project_name/.." etc.

If I change the output dir a new empty dir into the zip is created.

I can't understand how to use your useful class.

Thanks in advance