Bug #1208: semicolon (;) getting appended to string value
| From: | crow at ravenge dot com | Date: | Fri, 05 Mar 1999 20:20:25 +0000 |
| Subject: | Bug #1208: semicolon (;) getting appended to string value | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4486@lists.php.net to get a copy of this message | ||
From: crow@ravenge.com
Operating system:
PHP version: 3.0.7
PHP Bug Type: Parser error
Bug description: semicolon (;) getting appended to string value
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.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net