This article promotion people introduce phpword Chinese characters garbled solution, hope this article all help Oh.
Recently the leader asked to use PHP to generate word, online find a lot of classes ah, function ah. The final phase Phpword. Frustration is not the development of Chinese people, the support is very unfriendly. After research, finally solved the Chinese garbled, share out.
1. Use the template Word to generate word Chinese garbled solution:
Open a. phpword/template.php file, locate $replace = Utf8_encode ($replace), change it to $replace =iconv (' GBK ', ' utf-8 ', $replace); Can.
2, directly generated Word document, call AddText object when the Chinese garbled solution:
Open a. phpword/section.php file, locate $giventext = Utf8_encode ($text), change it to $giventext = Iconv (' GBK ', ' utf-8 ', $text);
3, seemingly other methods also similar to the resolution.
4, note PHP files using GBK Oh. Anyway, my display of Chinese. On the internet for a long time, studied for half a day to fix.
http://www.bkjia.com/PHPjc/632089.html www.bkjia.com true http://www.bkjia.com/PHPjc/632089.html techarticle This article promotion people introduce phpword Chinese characters garbled solution, hope this article all help Oh. Recently, the leader asked to generate word in PHP, online search for a lot of classes ah, function ...