Fix the bug: Fail to create text files that contain multibyte

characters in filemanager, for exmaple, files that contain Chinese
characters.

Reason for producing the bug: One parameter of "fwrite"
is "strlen ($data['content'])". To multibyte character, "strlen" can
not return its actual length. So "fwrite" cannot write all characters
to the created file.
This commit is contained in:
dawnlinux 2004-09-06 03:48:10 +00:00
parent 4b6047655f
commit 954dd1d9ab

View File

@ -902,7 +902,7 @@
{
if ($fp = fopen ($p->real_full_path, 'wb'))
{
fwrite ($fp, $data['content'], strlen ($data['content']));
fwrite ($fp, $data['content']);
fclose ($fp);
$write_ok = 1;
}