Re: shell_exec() question
| From: | Jason Brooke | Date: | Thu, 13 Jul 2000 00:46:50 +0000 |
| Subject: | Re: shell_exec() question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6346@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/ref.dir.php
if(chdir("/etc/tinydns/stuff/root/data"))
shell_exec("./tinydns-data");
jason
> what i would like to do is
>
> shell_exec('cd /etc/tinydns/stuff/root/data;./tinydns-data')
>
> works fine on the command line but not this way
>
>
> i have to cd to the directory because i need to be in the same directory
> as tinydns-data which opens a data file in that directory.
>
> I got around it by putting those commands in a shell script and
> shell_exec() the shell script but it would be nice to do it without the
> two line shell script