Home  >  Article  >  Backend Development  >  php Ajax garbled code_PHP tutorial

php Ajax garbled code_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:52:20829browse


And AJAX supports UTF8
Okay, first add a header on the PHP page ("content-type: text/html; charset=utf-8");
Tell the web page that the encoding of this implementation is UTF -8
Then use $test = iconv('gbk', 'utf-8′, $test); to convert the content to be output
and then output
If you are interested, you can take a look
header(”content-type:text/html; charset=utf-8″);
$test=”I am Chinese”;
echo $test;
$test = iconv('gbk', 'utf-8′,$ test);
echo $test;
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318918.htmlTechArticleAnd AJAX supports UTF8. Okay, first add a header("content-type:text/html" to the PHP page ;charset=utf-8″); Tell the web page that the encoding of this implementation is UTF-8 and then use $test=ic...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn