php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1208 semicolon (;) getting appended to string value
Submitted: 1999-03-05 15:20 UTC Modified: 1999-03-05 17:12 UTC
From: crow at ravenge dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.7 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: crow at ravenge dot com
New email:
PHP Version: OS:

 

 [1999-03-05 15:20 UTC] crow at ravenge dot com
This works:
<?php $fp = fopen("http://ravenge.com/larisa/footer.shtml", "r") ?>
<?php $strfoot = fgets($fp, 9999) ?>
<?php print($strfoot) ?>
<?php fclose($fp) ?>
Result: First line of footer.shtml displayed

This does not work:
<script language="php"> 
  $fp = fopen("http://ravenge.com/larisa/footer.shtml", "r");
  $strfoot = fgets($fp, 9999);
  print($strfoot);
  fclose($fp);
</script>;
Result: Same as the above (correct) result, except a semicolon (;) is
  being appended to the print() output.  This is either because 1. the
  print() statement is accidentally writing out the ";" at the end of the
  line, or 2. the fgets() statement is adding the ";" to the value of the
  $strfoot variable.

I do not have PHP installed on my system.  All I'm doing is uploading
test.php3 to my ISP and viewing the results in my browser.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-03-05 17:12 UTC] rasmus
Or 3) you have a ';' after the </script> tag.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 16:01:31 2024 UTC