Home > PHP Framework > YII > body text

How to jump to the page in yii

王林
Release: 2020-02-19 10:38:20
Original
2597 people have browsed it

How to jump to the page in yii

[Control] part:

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

Recommended tutorial: yii framework

[View] part:

<?php if(Yii::app()->user->hasFlash(&#39;commentSubmitted &#39;)): ?>
            <div class="flash-success">
                <?php echo Yii::app()->user->getFlash(&#39;commentSubmitted &#39;); ?>
            </div>
<?php endif; ?>
Copy after login

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!

Related labels:
yii
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!