472,333 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

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 1866
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Eric Lavigne | last post by:
Here is a shell command (MS-DOS): debug\curve-fit <input.txt >output.txt And here is a Python script that *should* do the same thing (and almost...
16
by: DJP | last post by:
Hi, I need to read a file programmatically until end of file. My logic is as follows: while(!feof(Fp)) { fgets(readLine,10000,Fp);
35
by: RyanS09 | last post by:
Hello- I am trying to write a snippet which will open a text file with an integer on each line. I would like to read the last integer in the...
3
by: seven.reeds | last post by:
Hi, I am running php v 5.0.0 on a redhat box. I have a php script in a file called p_script_1. I have another small script in file p_script_2....
1
by: Patrick | last post by:
Hi All, Can someone take a look at my script and tell me if I am missing something as to why the last line of data from my input file is being...
6
by: magix | last post by:
Hi, when I read entries in file i.e text file, how can I determine the first line and the last line ? I know the first line of entry can be...
12
by: Curten | last post by:
Hi, I'm using ifstream to read data from a txt-file but the last line is always read twice. How Come? The condition for the loop in which the...
1
by: empaleador | last post by:
Hi I m reading a file that ends with a blank line and when i do the output it repeats the line before the blank 2 times. I am using ...
3
by: PNY | last post by:
Hi all, I've made a form where it lists records sorted by their associated autonumber ID. The last line of this form displays a blank line with...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.