How to set the header code of php
This article mainly explains "how to set the header code of php". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to set the header code of php.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
How to set the php header code?
The code to set the utf encoding is as follows:
Header ("Content-type: text/html; charset=utf-8")
Note: the above code is usually placed on the front page of the php page
The header () function sends the original HTTP header to the client.
Attached:
Php pages are encoded for gbk
Header ("Content-type: text/html; charset=gb2312")
Php pages are encoded for big5
Header ("Content-type: text/html; charset=big5"); at this point, I believe you have a deeper understanding of "how to set the header code of php". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!