Php 调用laravel中未定义的函数move()

Php 调用laravel中未定义的函数move(),php,post,Php,Post,嗨,我从手机上收到一张图片,并尝试将其移动到almacernarlo的文件夹中。问题是,当我尝试移动它时,会出现错误 Symfony \ Component \ Debug \ Exception \ FatalErrorException Call to undefined function move() 我的代码: public function subirImagenes($idServicio){ //$file_path = "uploads/"; //dd(

嗨,我从手机上收到一张图片,并尝试将其移动到almacernarlo的文件夹中。问题是,当我尝试移动它时,会出现错误

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to undefined function move()
我的代码:

    public function subirImagenes($idServicio){
    //$file_path = "uploads/";
    //dd(public_path());
    $path = public_path().'/servicios/1';//.$idServicio;
    /*$file_path = $file_path . basename( $_FILES['uploaded_file']['name']);
    if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $file_path)) {
        echo "success";
    } else{
        echo "fail";
    }*/
    if($_FILES){
        //$file = $_FILES['file'];
        //move_uploaded_file($file, $file_path);
        //$fileContents = file_get_contents($file["tmp_name"]);
        //print_r($fileContents);

        $file = Input::file('file');
        if($file>move($path, '1')){
            $array = array('Message' => 'Imagen Movida', 'Code' => '202');

        }else{
            $array = array('Error' => 'InvalidArgumentError' , 'Code' => '404', 'Message' => 'Error interno');

        }

        return Response::json($array);

    }
}

我该怎么修呢?

我想你打错了:

$file>move($path, '1')
应该是:

$file->move($path, '1')
您想调用
$file->move()
,而不是将
$file
move()