Re: shell expansion (globbing) from inside php cli script

From: Date: Mon, 27 Jun 2005 19:59:08 +0000
Subject: Re: shell expansion (globbing) from inside php cli script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-217706@lists.php.net to get a copy of this message
$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' . $files . '} ' . $tmp_dir . '/'; That should work On 6/27/05, b-bonini@cox.net <b-bonini@cox.net> wrote: > Can not make this work inside a php script. > > Have tried several variations: > $cmd = "scp $user@stagingcws.$tld:$directory/\{$files} $tmp_dir/."; > > $cmd = "scp $user@stagingcws.$tld:$directory/" . '{' . $files . '} > ' . "$tmp_dir/."; > > etc... > > I can echo out the command and get a well formed command, i.e. one that will execute from a > command prompt, but when I try to exec() $cmd from within the script the globbing is taken > literally. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#217706) next »