note 111731 added to function.stream-get-line

From: Date: Thu, 21 Mar 2013 22:56:26 +0000
Subject: note 111731 added to function.stream-get-line
Groups: php.notes 
Request: Send a blank email to php-notes+get-194167@lists.php.net to get a copy of this message
I have been struggling with the problem that stream_get_line() sometimes reads too much when the 3rd parameter is used (and the 3rd parameter has a length greater than 1), so $ending is actually contained in the data returned (https://bugs.php.net/bug.php?id=63240). I don't have the option of upgrading my PHP version but it seems that a workaround can be to insert: fseek($fp, ftell($fp)); just before calling stream_get_line(). ---- Server IP: 195.184.96.15 Probable Submitter: 94.145.98.179 ---- Manual Page -- http://php.net/manual/en/function.stream-get-line.php Edit -- https://master.php.net/note/edit/111731 Del: integrated -- https://master.php.net/note/delete/111731/integrated Del: useless -- https://master.php.net/note/delete/111731/useless Del: bad code -- https://master.php.net/note/delete/111731/bad+code Del: spam -- https://master.php.net/note/delete/111731/spam Del: non-english -- https://master.php.net/note/delete/111731/non-english Del: in docs -- https://master.php.net/note/delete/111731/in+docs Del: other reasons-- https://master.php.net/note/delete/111731 Reject -- https://master.php.net/note/reject/111731 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194167) next »