基础不好有时会卡在一些简单的东西上面. thinkphp上传文件功能还是很好用的, 有时一个表单需要上传二个或者以上文件时.起先还以为是跟表单name一样来区别,实际上不上, file表单控件在tp里是通过file数组来区别,第一个文件是数组0开始. 以此类推.
Array
(
[0] => Array
(
[name] => 2.png
[type] => image/png
[size] => 30196
[key] => Uppic
[extension] => png
[savepath] => ./UploadImg/download/
[savename] => 20171203/1512299323.png
[hash] => 82387854f498c6e5d5b450bc29c97385
)
[1] => Array
(
[name] => 12.pdf
[type] => application/pdf
[size] => 2649
[key] => down_file
[extension] => pdf
[savepath] => ./UploadImg/download/
[savename] => 20171203/1512299323.pdf
[hash] => 917b51786c5929c8e41e0f83d9730954
)
)