Retrieves a list of models based on the current search/filter conditions.
public search ( ) : CActiveDataProvider | ||
return | CActiveDataProvider | the data provider that can return the models based on the search/filter conditions. |
<?php //ini_set("display_errors" ,1 ); require_once $_SERVER['DOCUMENT_ROOT'] . '/../init.inc.php'; $params = 'zhao'; //搜索关键词 $indexSearch = ContentList::search($params); Template::assign('indexType', $indexSearch); Template::display('search.tpl');