Two methods for setting php page encoding

Source: Internet
Author: User
Two methods for setting php page encoding

  1. Echo' ';

2. on the php page or html page

2. use the header function in the controller or page:

  1. Header ("content-type: text/html; charset = utf-8 ");

Php Class php to obtain the character string encoding format function PHP string encoding problem analysis php to realize UTF-8 and GB2312 encoding mutual conversion php GB2312 and UTF8 code php functions for converting gb2312 and UTF-8 encoding without the iconv library php encoding conversion function (the automatic conversion character set supports array conversion) php code conversion functions mb_convert_encoding and iconv instructions for php to change the encoding function iconv

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.