note 22154 deleted from function.shell-exec by nlopess

From: Date: Tue, 16 Dec 2003 15:41:52 +0000
Subject: note 22154 deleted from function.shell-exec by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62071@lists.php.net to get a copy of this message
Note Submitter: r3b3l@fuckMicrosoft.com ---- If you want to execute a command, and then output it as it would look in a terminal, with newlines and all, do this: $output = shell_exec($command); $output = str_replace("\xa","<br>",$output); echo($output); This will make it substitute the newlines for <br> tags, so you get a normal output. :)

« previous php.notes (#62071) next »