Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
Mods-for-HESK-Netsyms/api/http_response_code.php

15 rader
397 B
PHP

<?php
// For 4.3.0 <= PHP <= 5.4.0
if (function_exists('http_response_code') === false) {
function http_response_code($newcode = NULL) {
static $code = 200;
if ($newcode !== NULL) {
header('X-PHP-Response-Code: ' . $newcode, true, $newcode);
if (!headers_sent()) {
$code = $newcode;
}
}
return $code;
}
}