[Control] part:
Yii::app()->user->setFlash('commentSubmitted ','显示跳转后的信息'); $this->redirect('list.m'); //页面跳转,list.m是因为写重写了router
Recommended tutorial: yii framework
[View] part:
<?php if(Yii::app()->user->hasFlash('commentSubmitted ')): ?> <div class="flash-success"> <?php echo Yii::app()->user->getFlash('commentSubmitted '); ?> </div> <?php endif; ?>
For more programming-related content, please pay attention to the Introduction to Programming column on the php Chinese website!
The above is the detailed content of How to jump to the page in yii. For more information, please follow other related articles on the PHP Chinese website!