QEEPHP 搜索分页传值

controller里:

$key = $this->_context->get("key");
//搜索列名
$th = $this->_context->get("th");
$select = Article::find("$th like ?", '%'.$key.'%')->limitPage($page, 1);


view里:
<input name="controller" value="articles" type="hidden" />
<input name="action" value="list" type="hidden" />


control修改:

$this->_control('pagination', 'my-pagination', array(
            'pagination' => $pagination,
            'url_args'   => array(
								'key' => $key,
								'th'=> $th,
								),
        ));
    ?>

view里需要添加隐藏域,不然没有值。

你可能感兴趣的:(html,PHP)