<
>

yii怎么跳转页面

2020-08-24 08:04:15 来源:易采站长站 作者:

【Control】部分:

Yii::app()->user->setFlash('commentSubmitted ','显示跳转后的信息');$this->redirect('list.m'); //页面跳转,list.m是因为写重写了router

推荐教程:yii框架

【View】部分:

<?php if(Yii::app()->user->hasFlash('commentSubmitted ')): ?>            <div class="flash-success">                <?php echo Yii::app()->user->getFlash('commentSubmitted '); ?>            </div><?php endif; ?>

更多编程相关内容,请关注php中文网编程入门栏目!

暂时禁止评论

微信扫一扫

易采站长站微信账号