lpoolerl
(Rt Vitalmax)
1
Hey everyone!
How can I grab urls for CUrlManager from db table?
What if I create a class "ExUrlManager extends CUrlManager" and do the following:
public function init()
{
//prepare $rules;
$this->rules = $rules;
parent::init();
}
Would that be good?
qianggan
(qianggan@msn.com)
2
To specify URL rules, we need to configure the rules property of the urlManager application component:
array(
......
'components'=>array(
......
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'pattern1'=>'route1',
'pattern2'=>'route2',
'pattern3'=>'route3',
),
),
),
);
qianggan
(qianggan@msn.com)
3