[8] ErrorException in Search.php line 11

未定义数组索引: key

  1. namespace app\index\controller;
  2. use think\Db;
  3. class Search extends Common
  4. {
  5. public function index(){
  6. $input = input();
  7. $this->assign([
  8. 'keyword' => htmlspecialchars($input['key'])
  9. ]);
  10. return $this->fetch();
  11. }
  12. }
  13. ?>

Exception Datas

Error Context
input { "page": "7" }