From 7727a97e4aa0c4655dcdbdcc45d00482fabf3b15 Mon Sep 17 00:00:00 2001 From: skimrme Date: Fri, 31 Oct 2025 19:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=97=A5=E5=BF=97=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=8C=96=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/blog/index.php | 58 ++++++------------------------------------- public/blog/logs.php | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 51 deletions(-) create mode 100644 public/blog/logs.php diff --git a/public/blog/index.php b/public/blog/index.php index a8f2732..1100bac 100755 --- a/public/blog/index.php +++ b/public/blog/index.php @@ -31,56 +31,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
2025.08.20路由模式修改完善、现在开始重写文章系统
2025.08.19修改php_web的路由方式
2025.07.30新增post、模块,这是第一篇文章
这不是本来就应该有的吗
最后感谢提供php的md插件的开源制作者
点击跳转
2025.07.26新增wiki页面
2025.07.20新增giteadocker-registry页面
2025.07.09建立页面
@@ -172,8 +126,10 @@ #td_logs { - width: 75px; + width: 75px; padding-bottom: 5px; + padding-top: 5px; + vertical-align: top; } #td_logs_content diff --git a/public/blog/logs.php b/public/blog/logs.php new file mode 100644 index 0000000..e018805 --- /dev/null +++ b/public/blog/logs.php @@ -0,0 +1,47 @@ +"; + // 如果连接成功,但是内部状态有问题 + if ($db->lastErrorCode() !==0) { + // 依旧显示为连接失败 + die("数据库连接失败"); + } + + // 内容区 + // 执行sql命令 查询表单 + $select_id_date_content_from_logs_b_to_s /*查询logs表单中的id date content id重大到小排列*/ = $db->query('SELECT id, date, content FROM logs ORDER BY id DESC'); // 执行查询logs表单中的id date content id重大到小排列的命令 + + // 循环 写入 + while ($row = $select_id_date_content_from_logs_b_to_s->fetchArray(SQLITE3_ASSOC)) { + // 设定 ' ' 占用19个字符 + $nbsp_count = 0; + // 设定变量是 换行 加上 空格重复19个 + $br_nbsp = '
' . str_repeat(' ',$nbsp_count); + // 设定变量是 修改 && 为 换行 加上19个空格 + $alter_br = str_replace('&&', $br_nbsp, $row['content']); + + // 输出 date content + echo "" . "" . $row['date'] . "" . "" . $alter_br . "
" . ""; + + } + + + + // 关闭数据库连接 + $db->close(); + + // 捕获php报错 + } catch (Exception $e) { + // 依旧显示为连接失败 + die("数据库连接失败"); + // 关闭数据库连接 + $db->close(); + } + +?> \ No newline at end of file