新建一次合并、继续重构

This commit is contained in:
2025-08-22 11:00:35 +08:00
parent e62ae0968d
commit 6e79e2ee40
18 changed files with 677 additions and 64 deletions

View File

@@ -8,6 +8,7 @@
switch($request_uri){
case '/':
include './re_blog.php';
exit(); // 执行成功立即结束
break;
}
@@ -15,13 +16,13 @@
// posts 路由
include "./request/posts.php";
// 所有路由匹配结束后,检查是否找到路由
if (!$found_route) {
if (!$found_route) {
// 设置 HTTP 状态码为 404
header("HTTP/1.0 404 Not Found");
// 包含 404 页面文件
exit();
//exit();
include "../src/views/error/404.html";
}
exit(); // 执行成功立即结束
}