public function add(Request $request)
{
$file = $request->file('pic');
}$file打印结果是
object(think\File)#9 (13) {
["error":"think\File":private] => string(0) ""
["filename":protected] => string(27) "C:\Windows\Temp\phpBA5B.tmp"
["saveName":protected] => NULL
["rule":protected] => string(4) "date"
["validate":protected] => array(0) {
}
["isTest":protected] => NULL
["info":protected] => array(5) {
["name"] => string(80) "MV5BMjQ3ODE3MzA4Nl5BMl5BanBnXkFtZTgwMjM2NzI5MDI@._V1_UX182_CR0,0,182,268_AL_.jpg"
["type"] => string(10) "image/jpeg"
["tmp_name"] => string(27) "C:\Windows\Temp\phpBA5B.tmp"
["error"] => int(0)
["size"] => int(10086)
}
["hash":protected] => array(0) {
}
["pathName":"SplFileInfo":private] => string(27) "C:\Windows\Temp\phpBA5B.tmp"
["fileName":"SplFileInfo":private] => string(11) "phpBA5B.tmp"
["openMode":"SplFileObject":private] => string(1) "r"
["delimiter":"SplFileObject":private] => string(1) ","
["enclosure":"SplFileObject":private] => string(1) """
}那要打印$file属性要如何操作?$file->info
最佳答案