Thinkphp5 built-in method of handling file uploads, because not found in the developer documentation for instructions to upload the file basic information, it is here to do some recording.
$ File = request () -> file ( 'input for the type of file name value', '');
$fileInfo = $file->getInfo();
Can () helper function to view information Print $ fileInfo with the halt, the following information:
<pre>
array(5) {
["name"] => string(20) "file_name.png"
["type"] => string(9) "image/png"
["tmp_name"] => string(53) "C:\Users\Administrator\AppData\Local\Temp\php9481.tmp"
["error"] => int(0)
["size"] => int(19220)
}
</pre>