469,138 Members | 1,426 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,138 developers. It's quick & easy.

bollhy"system" function output displays twice last line

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
4 1772
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
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
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
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.

Similar topics

6 posts views Thread by Eric Lavigne | last post: by
35 posts views Thread by RyanS09 | last post: by
3 posts views Thread by seven.reeds | last post: by
1 post views Thread by Patrick | last post: by
6 posts views Thread by magix | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.