|  | Posted by Bob Winter on 06/29/05 06:34 
Brian,
 The format of your string that works for me is :
 
 $cmd = "scp $user@stagingcws.$tld:$directory/\{$files\}  $tmp_dir";
 
 $files must be a comma separated string with NO SPACES.
 
 Here is my complete test script for your review:
 ====  START  =====
 #!/usr/bin/php
 <?php
 
 $file1 = 'file_A';
 $file2 = 'file_B';
 $file3 = 'file_C';
 $files = "$file1,$file2,$file3";
 $directory = '/tmp';
 $user = 'root';
 $tld = 'com';
 $tmp_dir = '/tmp/test';
 $cmd = "scp $user@bmw.$tld:$directory/\{$files\}  $tmp_dir";
 
 exec($cmd, $output, $err);
 
 echo "string: $cmd \n";
 echo "status:$err \n";
 print_r($output);
 ?>
 === END ====
 
 Hope this solves your problem.
 --Bob
 
 
 Brian V Bonini wrote:
 >      if($confirm == "s") { //if staging suck the files down to temp local dir first
 >         $cmd = "scp $user@stagingcws.$tld:$directory/{{$files}} $tmp_dir/.";
 >         echo $cmd . "\n\n";
 >         exec($cmd, $output, $err);
 >         //shell_exec($cmd);
 >        }
  Navigation: [Reply to this message] |