ok, Mr. Know Nothing About PHP just found something out
just do the same old Linux commands inside of a
shell_exec() and bam!
here's an example:
Code:
<?php
// This script will create a .tar.gz of whatever file or directory you choose
// Be sure this script's directory has the proper permissions
//
// Set $name to the file or folder name you wish to compress,
// the file or folder must be inside of the folder the script is located.
$name = "";
shell_exec('tar -cvf ' .$name. '.tar ' .$name. '; gzip ' .$name. '.tar');
?>
well, its really simple. It doesn't have any idiotproofing though, it doesnt tell you if theres any specific problem (except for the default generated error).
Also, take a look at [url=http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/getting-started-guide/s1-zip-tar.html:3dzfol6l]This Link[/url:3dzfol6l] for linux compression and decompression commands :-)
Worked for me!