RE: [PHP] using shell_exec
| From: | Todd Pasley | Date: | Mon, 02 Sep 2002 03:32:13 +0000 |
| Subject: | RE: [PHP] using shell_exec | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114871@lists.php.net to get a copy of this message | ||
Use ; instead of |
e.g.
shell_exec("cd /change/to/dir; tar cvf /place/for/backup.tar files");
Todd.
> -----Original Message-----
> From: rdkurth@starband.net [mailto:rdkurth@starband.net]
> Sent: Monday, 2 September 2002 9:40 AM
> To: php-general
> Subject: [PHP] using shell_exec
>
>
>
> Can somebody tell me way this will work at the command line but will
> not work using PHP I also tried exec and system. from the command line
> it adds all the files and directors. But using the script below from
> PHP it creates an empty archive.
>
> shell_exec("cd /home/sites/www.directphp.net/ | tar --create --verbose
> --file=/home/sites/www.directphp.net/sitebackup/backup.192002.tar web");
>
>
>
> --
> Best regards,
> rdkurth mailto:rdkurth@starband.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>