新建一次合并、继续重构
This commit is contained in:
@@ -1,6 +1,32 @@
|
||||
<?php
|
||||
switch($request_uri){
|
||||
case '/blog/md/';
|
||||
include '/var/www/owp/open-ww3-project-ww3-tw/md/inite.php';
|
||||
exit(); // 执行成功立即结束
|
||||
|
||||
case '/blog/md/post/';
|
||||
include '../src/views/posts.php';
|
||||
include '../src/views/post.php';
|
||||
exit(); // 执行成功立即结束
|
||||
break;
|
||||
|
||||
case '/blog/md/post/s/2025/07/30/';
|
||||
header("Location: https://ww3.tw/blog/md/post/s/1");
|
||||
exit(); // 执行成功立即结束
|
||||
break;
|
||||
|
||||
case '/blog/md/post/s/2025/07/30';
|
||||
header("Location: https://ww3.tw/blog/md/post/s/1");
|
||||
exit(); // 执行成功立即结束
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$post_id = null; // 初始化 post_id 变量
|
||||
switch(true){
|
||||
case preg_match('/^\/blog\/md\/post\/s\/(\d+)$/', $request_uri, $matches):
|
||||
$post_id = (int)$matches[1];
|
||||
include "../src/views/posts.php";
|
||||
exit(); // 执行成功立即结束
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user