By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

bollhy"system" function output displays twice last line

P: n/a
hello,

i use a small PHP script to grab DNS infos at http://80.247.230.136/bug/php/
(php and txt available)

the trouble is the last line of every output given by "system"
function is always displayed twice, is it really a bug ?

http://80.247.230.136/bug/php/indexe...willemijns.com
Oct 29 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
se******************@gmail.com wrote:
the trouble is the last line of every output given by "system"
function is always displayed twice, is it really a bug ?
No, it's a feature. system() displays (part of) the output of the command
*and* returns the output of the command.

Try "system(foo);" instead of "echo system(foo);". And, as always, RTFM.

Cheers,
--
----------------------------------
Iván Sánchez Ortega -ivan-algarroba-sanchezortega-punto-es-

You will attract cultured and artistic people to your home.

Oct 30 '08 #2

P: n/a
On Oct 29, 5:18*pm, sebastien.willemi...@gmail.com wrote:
hello,

i use a small PHP script to grab DNS infos athttp://80.247.230.136/bug/php/
(php and txt available)

the trouble is the last line of every output given by "system"
function is always displayed twice, is it really a bug ?

http://80.247.230.136/bug/php/indexe...willemijns.com
More like a bug in the system program you're using... Check that
first, and then get back to us.
Oct 30 '08 #3

P: n/a
On Oct 30, 3:10 am, Michael Sherwood <coolha...@gmail.comwrote:
More like a bug in the system program you're using... Check that
first, and then get back to us.
no, kon from #PHP on irc.oftc.net have the workaround... use passthru
and now this script works ;)
thanks to this guy (or girl ? ;)
Oct 30 '08 #4

P: n/a
On Oct 30, 12:03 pm, "sebast...@willemijns.com"
<sebast...@willemijns.comwrote:
On Oct 30, 3:10 am, Michael Sherwood <coolha...@gmail.comwrote:
More like a bug in the system program you're using... Check that
first, and then get back to us.

no, kon from #PHP on irc.oftc.net have the workaround... use passthru
and now this script works ;)
thanks to this guy (or girl ? ;)
pfffffff.... i have quicky tested
passthru works well and Try "system(foo);" instead of "echo
system(foo);" too ;)

in all case, thanks to your answers ;)
Oct 30 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.