-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.php
31 lines (28 loc) · 1.6 KB
/
error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html style='background:black url("img/error.gif") no-repeat center center fixed;'>
<script type="text/javascript" src="../js/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="../js/all.js"></script>
<div id='select' style="width: 8%; top: 3%; right: 2%; position: absolute;">
</div>
<script>
selector(1,0);
</script>
<?php
$status = $_SERVER['REDIRECT_STATUS'];
$codes = array(
403 => array('403 Forbidden', 'The server has refused to fulfill your request.'),
404 => array('404 Not Found', 'The document or file requested was not found.'),
405 => array('405 Method Not Allowed', 'The method specified in the Request-Line is not allowed for the specified resource.'),
408 => array('408 Request Timeout', 'Your browser failed to send a request in the time allowed by the server.'),
500 => array('500 Internal Server Error', 'The request was unsuccessful due to an unexpected condition encountered by the server.'),
502 => array('502 Bad Gateway', 'The server received an invalid response from the upstream server while trying to fulfill the request.'),
504 => array('504 Gateway Timeout', 'The upstream server failed to send a request in the time allowed by the server.')
);
$title = $codes[$status][0];
$message = $codes[$status][1];
if ($title == false || strlen($status) != 3) {
$message = 'Please supply a valid status code.';
}
echo '<div style="width:40%;margin-left:30%;color:white;"><h1>' . $title . '</h1></div>'.
'<div style="width:40%;margin-left:30%;color:white; margin-top:-10px;"></p>' . $message . '</p></div>';
?>
</html>