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:53:00 +00:00
parent b549272971
commit 0ff3231643

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;
}