Files
open-ww3-project-ww3-tw/public/index.php
skimrme 0c70b66966 2025.11.02
日志以及文章完善了数据库存储
接下来就是完成上传数据库的前端与后端的融合了

**署名**
SkimrMe

 # 修改部分
 Changes to be committed:
	modified:   public/blog/index.php
	modified:   public/blog/logs.php
	new file:   public/blog/post/index.php
	new file:   public/blog/post/s/index.php
	deleted:    public/blog/read_file.php
	modified:   public/index.php
	deleted:    public/request/posts.php
	deleted:    src/views/index.php
	deleted:    src/views/post.php
	deleted:    src/views/posts.php
2025-11-02 14:54:04 +08:00

29 lines
642 B
PHP
Executable File

<!-- 主路由配置 -->
<?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(); // 执行成功立即结束
}