Html echo garbled php character set garbled after php is called
Php does not contain garbled characters when echo Chinese characters separately, but after html calls php, php echo Chinese characters are garbled.
Html is UTF-8; zend studio is used; the default character set of zend studio text editor is UTF-8.
Who can help me answer this question !!! Cainiao help ~
Reply to discussion (solution)
Header? Set to try.
Header? Set to try.
I tried ...... This is not easy to add.
Header ("Content-Type: text/html;
Charset = utf-8 ");
How to call it? Whether the php file is UTF-8 encoded.
How to call it? Whether the php file is UTF-8 encoded.
Solved ...... I found that the echo in my php is garbled ...... No, some are garbled, some are not ......
What about the browser code?
Is the echo result obtained from the database? If yes, the database encoding is inconsistent.
How to call it? Whether the php file is UTF-8 encoded.
Is it set in httpd. conf in apache?
Adddefacharcharset UTF-8