How PHP generates utf-8 HTML files
How does PHP generate utf-8 HTML files?? Note that it is not simple to add Instead, the file is generated after you open the Save as after using Notepad as the encoding is automatically utf-8.
------Solution--------------------
PHP itself is non-encoded, and all strings are usually treated as binary streams. So only the string you need to enter is Utf-8. If the string has other encodings, you can use the Iconv series function to convert the encoding.
------Solution--------------------
Fwrite ($f, "\XEF\XBB\XBF". Iconv (' GBK ', ' utf-8 ', $html));
------Solution--------------------
Utf-8, add in HTML file Soon enough, and then give you a class that generates static HTML
/******************8php Static Class *************/
Class Shtml
{
var $Templet;
var $DataSource;
var $Dir;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.