note 33723 rejected from function.system by pollita

From: Date: Sat, 05 Jul 2003 06:30:44 +0000
Subject: note 33723 rejected from function.system by pollita
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51546@lists.php.net to get a copy of this message
Note Submitter: unlrn@chaospunks.com ---- I'm not sure if this is an oddity with system() or my misuse of it's syntax, but I noticed some strange behavior. I was using system to execute a fortune command to display a random fortune on a webpage. Using system the following code worked, but often produced a duplicate of the last line. I'm not sure if it was the last line or more or less, but here is an example: $quote = system('fortune'); echo $quote; COMMENT Oh, life is a glorious cycle of song, A medley of extemporanea; And love is thing that can never go wrong; And I am Marie of Roumania. -- Dorothy Parker -- Dorothy Parker Don't get even -- get odd! -- get odd! Replacing the call to system with backticks made this odd behavior go away.

« previous php.notes (#51546) next »