PhpAjax garbled. AJAX supports UTF8, first add a header ("content-type: texthtml; charsetutf-8") on the PHP page ″); tell the web page that the encoding implementation is UTF-8 and then use $ testic to output the content while AJAX supports UTF8
All right, first add a header ("content-type: text/html; charset = utf-8") on the PHP page ″);
Tell the web page that this implementation code is UTF-8
Use $ test = iconv ('gbk', 'utf-8', $ test) to encode the content to be output.
Then in the output
If you are interested, take a look.
Header ("content-type: text/html; charset = utf-8 ″);
$ Test = "I am a Chinese character ";
Echo $ test;
$ Test = iconv ('gbk', 'utf-8', $ test );
Echo $ test;
?>
Okay. first add a header ("content-type: text/html; charset = utf-8") on the PHP page ″); tell the web page that the encoding of this implementation is UTF-8 and then use $ test = ic...