Example #1
0
/**
 * Returns an HTTP response status string for a given code
 *
 * @param string $num
 * @return string
 */
function http_response_status_code($num)
{
    if ($str = http_response_status($num)) {
        return "HTTP/1.1 {$num} {$str}";
    }
}
Example #2
0
/**
 * Returns an HTTP response status string for a given code
 *
 * @param string $num 
 * @return string
 */
function http_response_status_code($num)
{
    $protocole = empty($_SERVER["SERVER_PROTOCOL"]) ? "HTTP/1.1" : $_SERVER["SERVER_PROTOCOL"];
    if ($str = http_response_status($num)) {
        return "{$protocole} {$num} {$str}";
    }
}