📜  php 文件请求 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:55.775000             🧑  作者: Mango

代码示例1
/**
 * Common File Request Method
 */
$file = $request->file('file');
$file->getClientOriginalName(); // Returns the original file name
$file->getClientOriginalExtension(); // Returns the original file extension
$file->getClientMimeType(); // Returns the file mime type
$file->getMaxFileSize(); // Returns the given size from an ini value in bytes.
$file->getErrorMessage(); // Returns an informative upload error message.