Home >PHP Framework >YII >What should I do if paging in yii1.1 does not work?
yii1.1 paging does not work because the "layout.php" file is missing, causing all js and css to fail to load. The solution is to restore the "layout.php" file and load js and css normally. Just css.
Pagination style does not work
The problem is as follows:
$data = Goods::find()->Where(['is_recycle' => '0']); $pages = new Pagination(['totalCount' =>$data->count(), 'pageSize' => '1']); $model = $data->offset($pages->offset)->limit($pages->limit)->all(); return $this->renderPartial('index',[ 'model' => $model, 'pages' => $pages, ]); <?= \yii\widgets\LinkPager::widget([ 'pagination' => $pages, 'nextPageLabel' => '下一页', 'prevPageLabel' => '上一页', ]); ?>
Controller and view respectively. As a result, the paging code is not on the same line?
Recommended: "yii Tutorial"
Solution:
is because layout.php was deleted, causing all js and css failed to load.
The above is the detailed content of What should I do if paging in yii1.1 does not work?. For more information, please follow other related articles on the PHP Chinese website!