Yii prompt message to the user

Yii::$app- > getSession ()-> setFlash ("success", "saved successfully!") ; use this method to prompt information to the user, prompt a quick message, please ask how to set the time, let the prompt disappear after how long, if this prompt can not be realized, please ask, is there any other way to implement yii, thank you

Mar.06,2021

this just sets the message to session and deletes it once. It doesn't show up on the page.
look at the rendering layer file


<?php
    \Yii::app()->clientScript->registerScript(
        'myHideEffect',
        '$(".info").animate({opacity: 1.0}, 3000).fadeOut("slow");',
        CClientScript::POS_READY
    );
?>

usually use js to write a timer to disappear, find the part of the prompt box, and modify the disappearance time.


finally delay fade out
$(".fade"). Delay (5000). FadeOut ("slow") by finding the class of fade;

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b335bf-2be6e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b335bf-2be6e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?