综合上传

This commit is contained in:
2025-12-21 20:27:44 +08:00
parent 0ad1069e65
commit 26f3beb031
10 changed files with 5132 additions and 15 deletions

29
public/index.php.back Executable file
View File

@@ -0,0 +1,29 @@
<!-- 主路由配置 -->
<?php
$request_uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
// 定义条件
$found_route = false;
switch($request_uri){
case '/':
include './re_blog.php';
exit(); // 执行成功立即结束
break;
}
// posts 路由
// 整改中
// 所有路由匹配结束后,检查是否找到路由
if (!$found_route) {
// 设置 HTTP 状态码为 404
header("HTTP/1.0 404 Not Found");
// 包含 404 页面文件
//exit();
include "../src/views/error/404.html";
exit(); // 执行成功立即结束
}