1.创建model /biaodan.php <?php /** * Created by PhpStorm. * User: moka同学 * Date: 2016/08/05 * Time: 10:26 */ namespace app\models; use Yii; use yii\base\Model; class Biaodan extends Model{ public $name; public $pass; public $email; public $sex; publi…
思路是:在app/ceshi/fire下面有一个index操作方法来渲染显示前端文件,然后前端文件跳转到upload操作方法进行处理,成功显示"文件上传成功",失败显示错误. 首先是后台 app/ceshi/fire <?php namespace app\ceshi\controller; use think\Controller; use think\Request; class Fire extends Controller{ // 文件上传表单 public functi…