You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
482 B
PHP
14 lines
482 B
PHP
<?php
|
|
$code = $_SERVER['REDIRECT_STATUS'];
|
|
$codes = array(
|
|
403 => 'Forbidden',
|
|
404 => '404 Not Found',
|
|
500 => 'Internal Server Error'
|
|
);
|
|
$source_url = 'http'.((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
|
if (array_key_exists($code, $codes) && is_numeric($code)) {
|
|
die("Error $code: {$codes[$code]}");
|
|
} else {
|
|
die('Unknown error');
|
|
}
|
|
?>
|