THINKPHP5.1上传图片报错

浏览:889 发布日期:2019/01/03 分类:ThinkPHP5专区
致命错误: Call to a member function move() on null. function UploadImg(){
        $file = request()->file('imges');
        $id = input('id','','intval');
        $root_path = Env::get('app_path');
       // dump($file);die;
        $info = $file->move($root_path.'public/static/upload/');
        dump($info);die;
    $return = ['rlt'=>false,'error'=>'操作失败,请重试!','msg'=>''];
    return json($return);
    }
打印$file

但是打印$info就会报Call to a member function move() on null.
最佳答案
评论( 相关
后面还有条评论,点击查看>>