通过header content-type设置页面编码为utf-8:
1 2 3 |
<?php header('Content-Type: text/html; charset=utf-8'); ?> |
通过header location设置页面跳转:
1 2 3 |
<?php header('Location: https://www.dustit.me/'); ?> |
页面缓存设置:
1 2 3 4 |
<?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> |