//取得上传文件 |
$file = Input::file( 'photo' ); |
//判断有没有上传文件: |
if (Input::hasFile( 'photo' )) |
{ |
// |
} |
//移动上传的文件: |
Input::file( 'photo' )->move($destinationPath); |
Input::file( 'photo' )->move($destinationPath, $fileName); |
//取得上传文件的路径: |
$path = Input::file( 'photo' )->getRealPath(); |
//取得上传文件的原始文件名: |
$name = Input::file( 'photo' )->getClientOriginalName(); |
//取得上传文件的扩展名: |
$extension = Input::file( 'photo' )->getClientOriginalExtension(); |
//取得上传文件的大小: |
$size = Input::file( 'photo' )->getSize(); |
//取得上传文件的MIME类型: |
$mime = Input::file( 'photo' )->getMimeType(); |