欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

upload file - get filename not working

shiping1 的头像
Hi, Can anyone help me with this. I'm trying to get the file name of the file that I'm going to upload. But it was redirected to a black page. Kindly see my codes below

View

{{ Form::open(['files' => true]) }}

{{Form::file('my_pdf')}}

{{ Form::submit('postUploadPdf') }} {{Form::close()}}

Controller

                    if(Input::hasFile('my_pdf'))
        {
            $name = Input::get('my_pdf');
            return $name;

        }
        else
        {
            return "No File";
        }



来自 http://laravel.io/forum/10-07-2014-upload-file-get-filename-not-working
普通分类: