On 1/9/07, Ashley M. Kirchner <ashley@xxxxxxxxxx> wrote:
Curt Zirzow wrote: > Assuming paths is evil :) To add to what Curt says here, so is assuming the command actually exists. :)
ha! nice any shell command should really be used like: $cmd = '/bin/command ' . escapeshellcmd($userinput) exec($cmd . ' 2>&1', $output, $return_value); if($return_value != 0) { log("Command failed: $cmd"); log("Reason: " . implode("\n", $output); echo "It failed due to a system problem"; return false; } Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php