
Originally Posted by
nayen
No idea what that does but I am not trying to unzip, I am trying to zip and download.
I found another script that uses exec() function of PHP but it doesn't work if safe mode is enabled. I may use that but I am still looking for alternative options.
My bad, I wanted to say `zip` but, with safe-mode enabled...

Originally Posted by
http://php.net/manual/en/function.exec.php
Note: When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not allowed to have .. components in the path to the executable.
Without exec or passthru or "` operator", I cannot see a solution - you need an external program to do the job.
So, you may try
Code:
exec("zip -r output/files.zip path/to/dir");
Do it with error_reporting(E_ALL) so you'll know for sure if it works.
Bookmarks