Examples of two ways to set php page encoding
- 2021-01-18 06:19:58
- OfStack
1: Output meta label:
1. In the php mvc controller or php page echo ' < meta http-equiv="content-type" content="text/html; charset=utf-8" > ';
2, on the php page or html page < meta http-equiv="content-type" content="text/html; charset=utf-8" >
2: Use the header function
header("content-type:text/html; charset=utf-8");
1. In the php mvc controller or php page echo ' < meta http-equiv="content-type" content="text/html; charset=utf-8" > ';
2, on the php page or html page < meta http-equiv="content-type" content="text/html; charset=utf-8" >
2: Use the header function
header("content-type:text/html; charset=utf-8");