Home > Backend Development > PHP Tutorial > Solution to garbled php output content_PHP tutorial

Solution to garbled php output content_PHP tutorial

WBOY
Release: 2016-07-21 14:51:43
Original
879 people have browsed it

php output content includes web page display and pop-up information box content.
Garbled codes are generally caused by the difference between the display encoding selected by the browser and the encoding method of the web page. Although website visitors can solve the garbled code problem by manually selecting the encoding, this also greatly reduces the user affinity of the website, and there are not many people. Know how to do it.
Solution: Add header("Content-type: text/html; charset=UTF-8") at the beginning of the php file; UTF-8 is modified according to your web page encoding method.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371792.htmlTechArticlephp output content includes web page display and pop-up information box content. Garbled characters are generally caused by the difference between the display encoding selected by the browser and the encoding method of the web page. Although website viewers...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template