note 98756 added to function.fopen

From: Date: Mon, 05 Jul 2010 16:04:13 +0000
Subject: note 98756 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-170716@lists.php.net to get a copy of this message
@ te at sky-networx dot de: the encoding part is wrong, i.e.: <?php if ($sEncoding = mb_detect_encoding($sData, 'auto', true) != $sCharset) $sData = mb_convert_encoding($sData, $sCharset, $sEncoding); ?> Variable $sEncoding is set to result of the comparison and hence to a boolean value. It probably works in your case, since your files are UTF-8 encoded by default. <?php if (($sEncoding = mb_detect_encoding($sData, 'auto', true)) != $sCharset) $sData = mb_convert_encoding($sData, $sCharset, $sEncoding); ?> however thanks for the generic function ---- Server IP: 85.214.154.209 Probable Submitter: 91.5.121.150 ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit -- https://master.php.net/note/edit/98756 Del: integrated -- https://master.php.net/note/delete/98756/integrated Del: useless -- https://master.php.net/note/delete/98756/useless Del: bad code -- https://master.php.net/note/delete/98756/bad+code Del: spam -- https://master.php.net/note/delete/98756/spam Del: non-english -- https://master.php.net/note/delete/98756/non-english Del: in docs -- https://master.php.net/note/delete/98756/in+docs Del: other reasons-- https://master.php.net/note/delete/98756 Reject -- https://master.php.net/note/reject/98756 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170716) next »