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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
24 - 16 = ?
Subscribe to this entry?

 
 [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: Sat Dec 14 08:01:27 2024 UTC