~~ssh~~ https auto update
This commit is contained in:
parent
023237dff9
commit
1a9f30a0f3
@ -58,6 +58,11 @@ $proj=$tid2proj_l[$tid];
|
|||||||
$pf=realpath(__DIR__."/".$proj["path"]."/handle_external_flag.php");
|
$pf=realpath(__DIR__."/".$proj["path"]."/handle_external_flag.php");
|
||||||
|
|
||||||
if(!is_readable($pf)) {
|
if(!is_readable($pf)) {
|
||||||
|
$pf1=realpath(__DIR__."/".$proj["path"]."/automake_attachment.php");
|
||||||
|
if(is_readable($pf1)) {
|
||||||
|
gen_error_404("challange ".$proj["name"]." has been found, but the entry handle_external_flag.php does not exist. However, the entry automake_attachment.php was found. ARE YOU SURE this challenge is EXTERNAL?");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
gen_error_500("challange ".$proj["name"]." has been found, but the entry handle_external_flag.php does not exist.");
|
gen_error_500("challange ".$proj["name"]." has been found, but the entry handle_external_flag.php does not exist.");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
function gen_error_400($reason="") {
|
function gen_error_400($reason="") {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
echo "bad request: ";
|
echo "400 bad request: ";
|
||||||
echo $reason;
|
echo $reason;
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "٩(๑`^´๑)۶你对这个小程序做了什么哇...";
|
echo "٩(๑`^´๑)۶你对这个小程序做了什么哇...";
|
||||||
@ -12,6 +12,7 @@ function gen_error_400($reason="") {
|
|||||||
|
|
||||||
function gen_error_404($reason="") {
|
function gen_error_404($reason="") {
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
|
echo "404 resource not found: ";
|
||||||
echo $reason;
|
echo $reason;
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "(⊙.⊙)这...这不对吧...";
|
echo "(⊙.⊙)这...这不对吧...";
|
||||||
@ -21,6 +22,7 @@ function gen_error_404($reason="") {
|
|||||||
|
|
||||||
function gen_error_405($reason="") {
|
function gen_error_405($reason="") {
|
||||||
http_response_code(405);
|
http_response_code(405);
|
||||||
|
echo "405 method not allowed: ";
|
||||||
echo $reason;
|
echo $reason;
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "(/‵Д′)/~ ╧╧你到底在干什么啊";
|
echo "(/‵Д′)/~ ╧╧你到底在干什么啊";
|
||||||
@ -30,7 +32,7 @@ function gen_error_405($reason="") {
|
|||||||
|
|
||||||
function gen_error_500($reason="") {
|
function gen_error_500($reason="") {
|
||||||
http_response_code(500);
|
http_response_code(500);
|
||||||
echo "internal error: ";
|
echo "500 internal error: ";
|
||||||
echo $reason;
|
echo $reason;
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "(✘Д✘๑ )哇啊!服务器居然出错惹...呜呜...。゚ヽ(゚´Д`)ノ゚。";
|
echo "(✘Д✘๑ )哇啊!服务器居然出错惹...呜呜...。゚ヽ(゚´Д`)ノ゚。";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user