yii怎么跳转页面

yii怎么跳转页面,第1张

yii怎么跳转页面

【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中文网编程入门栏目!

以上就是yii怎么跳转页面的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/701990.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-23
下一篇 2022-04-23

发表评论

登录后才能评论

评论列表(0条)

保存