Jump to content

Windows zip file creation from system()


pnj

Recommended Posts

I'm running php 5 on Windows XP.  I'm wondering if there's a way to call Windows XP's integrated zip file creation utility from the command line.  The only place I can find this is in the XP context menu, but I imagine there must be a command.  I want to run it from a php script using the system() function.

system ("zip folder/*.* foo.zip"); // or something like that.

thanks,
pnj
Link to comment
https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/
Share on other sites

Ive never used it but it looks to me like you could create zip files using [url=http://php.net/manual/en/function.ziparchive-open.php]ZipArchive::open[/url] and [url=http://au3.php.net/manual/en/function.ziparchive-addfile.php]ZipArchive::AddFile[/url], of course, I could be wrong.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.