在main.php中配置: 'components'=>array( 'user'=>array( // enable cookie-based authentication 'allowAutoLogin'=>true, 'returnUrl' => array('/site/inde...