note 76367 added to function.file

From: Date: Thu, 12 Jul 2007 09:25:59 +0000
Subject: note 76367 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-128402@lists.php.net to get a copy of this message
This note applies to PHP 5.1.6 under Windows (although may apply to other versions). It appears that the 'FILE_IGNORE_NEW_LINES' flag doesn't remove newlines properly when reading Windows-style text files, i.e. files whose lines end in '\r\n'. Solution: Always use 'rtrim()' in preference to 'FILE_IGNORE_NEW_LINES'. ---- Server IP: 87.124.64.96 Probable Submitter: 86.20.160.201 ---- Manual Page -- http://www.php.net/manual/en/function.file.php Edit -- https://master.php.net/note/edit/76367 Del: integrated -- https://master.php.net/note/delete/76367/integrated Del: useless -- https://master.php.net/note/delete/76367/useless Del: bad code -- https://master.php.net/note/delete/76367/bad+code Del: spam -- https://master.php.net/note/delete/76367/spam Del: non-english -- https://master.php.net/note/delete/76367/non-english Del: in docs -- https://master.php.net/note/delete/76367/in+docs Del: other reasons-- https://master.php.net/note/delete/76367 Reject -- https://master.php.net/note/reject/76367 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128402) next »