|
Posted by David Haynes on 06/23/06 20:05
seven.reeds wrote:
> 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. p_script_1 calles p_script_2 through a system() call. THe
> last line of the output from p_script_2 is duplicated. As a test I ran
>
> php -E 'echo system ("ls ");'
>
> <you have to hit ^D after you hit newline>. Anyway, this simple "ls"
> is also duplicating the last line of output. Is this a bug or feature?
>
>
> Oh, just got access to a brand new, up to date RedHat box running php
> 5.1.4 and it is happening there too.
>
ls already emits to STDOUT.
So, you have the output from the 'ls' command and then 'echo' echoing
the last line.
try php -E 'system("ls");' to see the difference.
To see what is really happening, try this:
php -E 'echo -->.system("ls");'
-david-
[Back to original message]
|