-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.php
More file actions
28 lines (28 loc) · 967 Bytes
/
404.php
File metadata and controls
28 lines (28 loc) · 967 Bytes
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
<?php
session_start();
$phrases = [
"ERROR 404 : This meme has been deleted by the council.",
"You ventured too deep. Turn back, traveler.",
"Oops. This page ghosted us.",
"You weren't supposed to see this. Now we have to kill you.",
"Page not found... but your sense of humor is.",
"This page went out for milk and never came back.",
"Bro, even Shrek can't find this one.",
"404 : Vibe check failed.",
"Nothing here but pain and broken links.",
"Congrats, you found our secret hideout. Just kidding. It's broken.",
];
if (isset($_SESSION["404_code"]) && !empty($_SESSION["404_code"])) {
$errorCode = htmlspecialchars($_SESSION["404_code"]);
unset($_SESSION["404_code"]);
} else {
$errorCode = 404;
}
if (isset($_SESSION["404_message"]) && !empty($_SESSION["404_message"])) {
$errorMessage = htmlspecialchars($_SESSION["404_message"]);
unset($_SESSION["404_message"]);
} else {
$errorMessage = $phrases[array_rand($phrases)];
}
include "404.html";
?>