$dataProvider=new CActiveDataProvider('Articles',array(
'criteria'=>array(
//'select' => 't.id, t.abc',
'order'=>'publish_on DESC',
'condition' => '',
),
'pagination'=>array(
'pageSize'=>7,
'route' => 'site/index'
),
));
我的URL像这样:xyz.com/site/index?Articles_page=2
但我想要:xyz.com/?Articles_page=2
请帮助他如何做?
你好朋友终于解决了我的问题。您必须在config文件夹中的main.php文件中添加 '/'=>'site/index'
。