常用代码片段

  1. 1. html utf-8
  2. 2. header

html utf-8

1
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
1
2
3
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: text/html; charset=utf-8');