2021
03-05
03-05
PHP之header函数详解
PHP的header函数是最常用的函数之一,用于向客户端发送HTTP头信息。通过的用法如设置编码、发送HTTP状态值以及重定向。phpheaderutf8:header(“Content-type:text/html;charset=utf-8″);phpheader404:header(“HTTP/1.0404NotFound”);上述两个例子分别是设置UTF8编码和发送404状态。header重定向:header(‘Location:http://www.phpthinking.com');其他常用的Header用法://Header永久性重定向,一般301与headerL...
继续阅读 >