note 49428 added to function.fputs

From: Date: Thu, 27 Jan 2005 15:44:10 +0000
Subject: note 49428 added to function.fputs
Groups: php.notes 
Request: Send a blank email to php-notes+get-84078@lists.php.net to get a copy of this message
well, well.. i experienced some serious trouble with fputs, fgets and fwrite on a unix-platform. using fputs, fgets or fwrite with the optional length parameter should be binary safe, but it is not on my system. Data always is cut off behind the 0-byte. The only way to fix it, was to encode the binary data, and replacing the 0-bytes. of course, to read the file, you must do the decoding after reading the file-contents. I have no information about OS and php-Version on that system, all status information variables are switched off. Maybe that's a bug in some old php Version, or maybe something OS dependent. Just wanted to report here. Greetings Andreas ---- Manual Page -- http://www.php.net/manual/en/function.fputs.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49428 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49428&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49428&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49428&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49428&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49428&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49428&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84078) next »