|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-12 02:31 UTC] admin at kthxbai2u dot com
[2009-08-12 02:36 UTC] rasmus@php.net
[2009-08-15 21:26 UTC] admin at kthxbai2u dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 20:00:02 2026 UTC |
Description: ------------ When I use fgets() it returns the line, and the next one... Correct me if I am wrong, but when you ask for one line, it should return one line? There is not even a function (that I have found yet) that returns ONLY 1 line... fgets should not be adding a /r/n at the end, that should be up to the programmer... Reproduce code: --------------- --- From manual page: function.fgetss --- $fp = fopen("AD_SYSTEM/popup.ads",'r'); while($line=fgets($fp)) { //add the link text to the array $ads[] = $line; } fclose($fp); echo $ads[1]; Expected result: ---------------- "http://somepopup.url/advertisement.html" (without quotes) Actual result: -------------- "http://somepopup.url/advertisement.html " (without quotes, notice the 2nd line)