您没有权限访问此页面。
"; exit; } // 发布文章逻辑 if ($_SERVER['REQUEST_METHOD'] == 'POST') { $title = $_POST['title']; $content = $_POST['content']; $type = $_POST['type']; // 获取文章类型 $stmt = $pdo->prepare("INSERT INTO articles (title, content, type, created_at) VALUES (?, ?, ?, NOW())"); if ($stmt->execute([$title, $content, $type])) { echo "文章发布成功!
"; } else { echo "文章发布失败!
"; } } ?>