Home  >  Article  >  PHP Framework  >  How to jump to the page in yii

How to jump to the page in yii

王林
王林Original
2020-02-19 10:38:202593browse

How to jump to the page in yii

[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(&#39;commentSubmitted &#39;)): ?>
            <div class="flash-success">
                <?php echo Yii::app()->user->getFlash(&#39;commentSubmitted &#39;); ?>
            </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!

Statement:
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
Previous article:yii hide error messageNext article:yii hide error message