Re: note 8439 added to system

From: Date: Fri, 15 Sep 2000 21:31:20 +0000
Subject: Re: note 8439 added to system
Groups: php.notes 
Request: Send a blank email to php-notes+get-5088@lists.php.net to get a copy of this message
If you do need to capture the output, do not use system, use the backticks or exec: exec("ls",&$list); The output will be in the $list array, change it as you see fit. $list = ls; Note the use of backticks, $list will be a string containing all the resulting output from the command. All of this is documented in the manual. --- Eric Stewart <eric@dudley.lib.usf.edu> wrote: > Actually I've found that this doesn't work as > desired for > 'system', since the string 'returned' by system is > the last line ... all > other lines are echoed (to the browser) and since > they are echoed, they > aren't used as inputs to any function that calls the > system function. :( > > On Thu, 14 Sep 2000, J. M. Castagnetto wrote: > > > See htmspecialchars or htmlentitites > > > > Your note has been deleted. > > > > --- eric@lib.usf.edu wrote: > > > If the command returns an HTML character (such > as < > > > or >), it will be interpreted by the browser ... > so > > > some method (which I haven't derived yet) for > > > converting these characters to &lt; or &gt; on > the > > > fly is needed ... > > > > > > http://www.php.net/manual/function.system.php > > > > > > > > > -- > > > PHP Notes Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: > > > php-notes-unsubscribe@lists.php.net > > > For additional commands, e-mail: > > > php-notes-help@lists.php.net > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > ===== > > --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Mail - Free email you can access from > anywhere! > > http://mail.yahoo.com/ > > > > -- > Eric A. Stewart - Network Administrator - > eric@dudley.lib.usf.edu > University of South Florida, Tampa Campus Library - > Systems > Work: http://www.lib.usf.edu/ | MS/MIS > | ICQ# > Play: http://cerebus.lib.usf.edu/ | Graduate Student > | 31285736 > SSI OW#100762 > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.notes (#5088) next »