bollhy"system" function output displays twice last line

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sebastien.willemijns@gmail.com

    #1

    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 ?


  • =?UTF-8?B?SXbDoW4gU8OhbmNoZXogT3J0ZWdh?=

    #2
    Re: bollhy"sys tem" function output displays twice last line

    sebastien.wille mijns@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.

    Comment

    • Michael Sherwood

      #3
      Re: bollhy"sys tem" function output displays twice last line

      On Oct 29, 5:18 pm, sebastien.wille mi...@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.

      Comment

      • sebastien@willemijns.com

        #4
        Re: bollhy"sys tem" function output displays twice last line

        On Oct 30, 3:10 am, Michael Sherwood <coolha...@gmai l.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 ? ;)

        Comment

        • sebastien@willemijns.com

          #5
          Re: bollhy&quot;sys tem&quot; function output displays twice last line

          On Oct 30, 12:03 pm, "sebast...@will emijns.com"
          <sebast...@will emijns.comwrote :
          On Oct 30, 3:10 am, Michael Sherwood <coolha...@gmai l.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 ;)

          Comment

          Working...