Home  >  Article  >  Backend Development  >  Examples of two methods for setting PHP page encoding_PHP tutorial

Examples of two methods for setting PHP page encoding_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:37:07766browse

1: Output meta tag:

1. In the controller of php mvc or in the php page echo '';

2. On the php page or html page

2: Use the header function

in the controller or page header("content-type:text/html; charset=utf-8");

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/736817.htmlTechArticle1: Output meta tag: 1. Echo 'meta http-equiv in the controller of php mvc or php page ="content-type" content="text/html; charset=utf-8"'; 2. In the php page or html page meta http-...
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