php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12238 Double printing with echo and print
Submitted: 2001-07-18 18:39 UTC Modified: 2001-07-18 18:45 UTC
From: mahk at home dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.0.6 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mahk at home dot com
New email:
PHP Version: OS:

 

 [2001-07-18 18:39 UTC] mahk at home dot com
The following html/php script gives a duplicate of the last line.

<HTML>
<BODY><CENTER><B>
<P>System name:
<?php echo( system("hostname")  ); ?>
<P></B></CENTER> </BODY>
</HTML>

returns the following html output.

<HTML>
<BODY><CENTER><B>
<P>System name:
kelsey
kelsey<P></B></CENTER> </BODY>
</HTML>

I've used the standard compile:
 './configure' '--with-mysql' '--with-apxs'

System: Linux kelsey 2.2.19-6.2.1 #1 Mon Apr 9 21:59:11 EDT 2001 i486 unknown



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-18 18:45 UTC] cynic@php.net
RTFM (Reading The Fine Manual) never killed anyone. You should try that. :)

"System() is just like the C version of the function in that it executes the given command and outputs the result. [...] Returns the last line of the command output on success, and false on failure."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC