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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Dec 07 05:01:29 2024 UTC