Page 1 of 1

help understand output

Posted: Thu Sep 22, 2011 11:59 pm
by rusking
the silenced portions are what im trying todo in the end but i am trying to use an output or echo as a diag tool. The only problem is i can use "cd" or "dir" and is shows in the echo but "cd client" shows nothing and the dir is there. Any ideas cuz im pretty new and lost

Code: Select all

<?php

$tempFolder = 'C:\\xampp\\htdocs\\remote\\'; 
$filename7Z = 'C:\\xampp\\7-zip\\7z.exe'; 
$sessionKey = 'iworked';

$commandtest = "dir";
//$commandtest = "'C:\\xampp\\7-zip\\7z.exe a " .$tempFolder. "c" .$sessionKey. ".7z C:\\xampp\\htdocs\\remote\\client\\' copy /b C:\\xampp\\htdocs\\remote\\support\\7zS.sfx+ C:\\xmapp\\htdocs\\remote\\client\\config.txt+".$tempFolder."c".$sessionKey.".7z c".$sessionKey.".exe'";

$output = shell_exec($commandtest);
$myfile = "test.txt";
$fh = fopen($myfile, 'w');
fwrite ($fh,"<pre>$output</pre>");

echo ("<pre>$output</pre>")
  

?>