/**
* 输出常见HTTP状态信息
* @param integer $code 状态码
*/
function send_http_status($code) {
http://www.gaodaima.com/50800.htmlsend函数: php常用函数之send_http_sta_php
$status = array(
200 => ‘OK’,
301 => ‘Moved Permanently’,
302 => ‘Moved Temporarily ‘,
400 => ‘Bad Request’,
401 => ‘Unauthorized’,
403 => ‘Forbidden’,
404 => ‘Not Found’,
500 => ‘Internal Server Error’,
503 => ‘Service Unavailable’,
);
$str = isset($status[$code]) ? (‘ ‘ . $status[$code]) : ”;
header("HTTP/1.1 $code$str");
}
本文链接http://www.cxybl.com/html/wlbc/Php/20130607/38422.html
欢迎大家阅读《send函数: PHP常用函数之send_http_sta_php》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码