Exemple #1
0
/**
 * Output proper HTTP header for a given HTTP code
 *
 * @param string $code
 * @return void
 */
function status($code = 500)
{
    if (!headers_sent()) {
        $str = http_response_status_code($code);
        header($str);
    }
}
Exemple #2
0
/**
 * Output proper HTTP header for a given HTTP code
 *
 * @param string $code 
 * @return void
 */
function status($code = 500)
{
    //  if(!headers_sent())
    //{
    $str = http_response_status_code($code);
    send_header($str);
    //}
}