|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-03-05 17:12 UTC] rasmus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
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.