Reply to Re: [PHP] shell expansion (globbing) from inside php cli script

Your name:

Reply:


Posted by Andrι Medeiros on 06/27/05 22:59

$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
>
>

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация