<?php error_reporting(0); require_once '../../../models/HotKeys.php'; require_once '../../../models/Response.php'; $re = new Response(); $hotkey = $_POST['key']; if (isset($hotkey)) { $a = new HotKeys(); if ($a->hotkeyAdd($hotkey)) { header('Location:' . $_SERVER['HTTP_REFERER']); } else { echo $re->show(400); } } else { echo $re->show(400); }
<?php error_reporting(0); require_once '../../../models/HotKeys.php'; $id = $_GET['id']; if (!isset($id)) { header('Location:' . $_SERVER['HTTP_REFERER']); } $re = new HotKeys(); $re->hotkeyDel($id); header('Location:' . $_SERVER['HTTP_REFERER']);
<?php //搜索热词接口 require_once '../../models/Response.php'; require_once '../..//models/HotKeys.php'; $re = new HotKeys(); $data = $re->showKey(); $style = new Response(); echo $style->show(200, $data);