Render content directly from Yii controller in PHP

Member

braden_wiegand

by braden_wiegand , in category: PHP , 23 days ago

Render content directly from Yii controller in PHP 🤪

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if(!$serverId){
    echo "<script>alert('请选择区服');setTimeout(function(){history.go(-1);},1000)</script>";die;
}
if(!$type){
    echo "<script>alert('请填写活动类型');setTimeout(function(){history.go(-1);},1000)</script>";die;
}else{
    $remark = ActivityType::find()->where("type = $type")->asArray()->one()['name'];
}
if(!$beginTime){
    echo "<script>alert('请选择开始时间');setTimeout(function(){history.go(-1);},1000)</script>";die;
}
if(!$endTime){
    echo "<script>alert('请选择截止时间');setTimeout(function(){history.go(-1);},1000)</script>";die;
}


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers