Triple Agency Spy Detective OxyDac, to the rescue!
Seems like Admin and I have a lot of explaining to do.
To our lawyers, after suing that site for psychological damages. Don’t even want to imagine what they’ve created.
REDACTED
A certain Terminator may need to be sent to their location.
Yeah, but posting it on your forum would get even less notice, and maybe you could do a silent warning (ghostping @ Tester to get everyone to work). I know I will, as soon as I fulfill my last Uni duties.
I’m not sure why, but ever since I made my error pages dynamically show, using include on the 404 page does not work. Maybe someone here can help?
Code
$code = (int) $_GET["code"];
switch ($code) {
case 400:
$title = "Bad Request";
$msg = "We're sorry but there was a bad request sent to the server.";
break;
case 401:
$title = "Unauthorized Client";
$msg = "Sorry, but your client may not be authorized to access this site and may need authentication.";
break;
case 403:
$title = "Forbidden";
$msg = "The website's configurations prevents you from accessing the page.";
break;
case 404:
$title = "Not Found";
$msg = "The page you were trying to reach was not found.";
break;
case 405:
$title = "Method Not Allowed";
$msg = "The page you requested used an illegal method.";
break;
case 418:
$title = "Teapot";
$msg = "I'm a teapot.";
break;
case 429:
$title = "Too Many Requests";
$msg = "Too many requests have been sent to the server.";
break;
case 500:
$title = "Internal Server Error";
$msg = "There is a problem with the website's internal server. Please report the issue by contacting us.";
break;
case 502:
$title = "Bad Gateway";
$msg = "We're sorry, but this page responded with a bad gateway.";
break;
case 503:
$title = "Service Unavailable";
$msg = "The website is temporarily unavailable. This usually has to do with a load issue.";
break;
default:
header("location: /");
exit;
}
So if I go to “/error/error?code=404” it should just display some HTML with the title and the message. But if I use include($_SERVER["DOCUMENT_ROOT"]."/error/error?code=404") in another page, it will show:
Warning: include({ROOT}/error/error?code=404): failed to open stream:
No such file or directory on line 2
Yes, that’s intended. However, let me give you an example I have a file called “verify.php” and if the $_GET["token"] isn’t set, then I want it to show the Error 404 page. If you want to you can try it yourself: https://flounder.epizy.com/account/settings/verify
@Greenreader9 I believe I found the issue that I was having. First, I didn’t put error.php. Second, for some reason include and require will take any URL query and think it’s part of the file name. I just wasted all that time and now I have to come up with a solution.
I know… I’ve been doing full stack for over two years now. And a little update: I figured out how to pass the GET query parameter. It turns out all I had to do was define the $_GET["code"] before including the error page. Thanks to you and PHP include() with GET attributes (include file.php?q=1) - Stack Overflow for helping me figure this out.
This is now an opportunity for NATO to raise the bar,
and probably send a complete range of weapons to Ukraine.
This activates Article 4, but for the russians it is Article 5 in the long run.
It’s true, but a NATO official (I heard, not sure) commented that the missiles weren’t targetting Poland (which Russia will also claim when they stop claiming the missiles didn’t actually hit Poland), so Article 5 will most likely not get activated.
russia also said that it will not attack Ukraine, but that everything is just a military exercise while it was massing the army on the border…then when they attacked, they said that it was just a special military operation…then how will there be no mobilization…then…then…
So for a long time everything they say is a lie