In form validating,I find such codes
if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
The manual says that the end() method will terminate the application.
Why to terminate the app? The following codes will not execute?
Yes, it’s an Ajax request and the code is supposed to return the validation results and then stop code execution. It’s the same idea as the Php die function, but allows Yii to run onApplicationEnd cleanup code (if any)