I'm having a bit of an issue using exec() and system().
Background:
I have this script that installs forum software for a client, and that works like a
champ. In it I use system() to copy
the the default forum directory to the specified location the client sets, along with
a unique directory name for the
forum. The code looks like:
$dir="unique_dir";
system("cp -R forum /path/of/forum/location/of/forums/".escapeshellarg($dir));
The forum directory is located in the same directory as the script.
Now, this is where I run into trouble. When they delete directories, I want to backup
the directory before I delete it
just in case they delete the wrong information. I just can't get it to work. I've
tried exec() and system() to no avail.
Of course, I'm under the impression I can use tar via exec(). Currently I have:
$dir="unique_dir";
$cmd="tar -cf /location/of/tar/files/$dir.tar /location/of/forum/diretory/*";
exec($cmd);
This should work shouldn't? Any thoughts, suggestions? Anyone else done something like
this?
TIA
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php