Code:
html:
<input type="file" name="img" multiple="multiple" />
php:
$file=$request-> file('img');
After selecting multiple pictures through input in the web page, select the file name to accept in the background, but only one file can be accepted. Why is this?
I hope God can give me some advice, urgent! ! ! ! !
PHP中文网2017-05-27 17:45:30
html :
<input type="file" name="img[]" multiple="multiple" />
php :
$file = $_FILES['img'];
世界只因有你2017-05-27 17:45:30
<input type="file" name="img[]" multiple="multiple" />
多个文件的话 name='' 必须加 []数组形式