首页 新闻 赞助 找找看

yii2.0表单创建报这个错 PHP Warning – yii\base\ErrorException The use statement with non-compound name 'Yii' has no effect

0
[已关闭问题] 关闭于 2017-06-16 16:52

代码

use yii\helpers\Html;
use yii\widgets\ActiveForm;

$form = ActiveForm::begin([
'action' => ['test/getpost'],
'method'=>'post',
]); ?>
<?= $form->field($model, 'username') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<div class="form-group">
<div class="col-lg-offset-1 col-lg-11">
<?= Html::submitButton('Login', ['class' => 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
*琴的主页 *琴 | 菜鸟二级 | 园豆:204
提问于:2017-06-16 16:50
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册