ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ 单个的input type="file"表单也是可以实现多图片上传的 代码如下: <form action="manypic.php" method="post" enctype="multipart/form-data"> <input type="file" name="manypic[]" multiple> <input type="submit"> </form> 这里要给file表单加上一个multiple属性 multiple="multiple"也可以 name的属性值后面要加上[]这样就可以了 print_r($_FILES)可得到如下信息: Array ( [manypic] => Array ( [name] => Array ( [0] => 1.png [1] => bg.jpg ) [type] => Array ( [0] => image/png [1] => image/jpeg ) [tmp_name] => Array ( [0] => D:\xampp\tmp\php8C53.tmp [1] => D:\xampp\tmp\php8C54.tmp ) [error] => Array ( [0] => 0 [1] => 0 ) [size] => Array ( [0] => 44113 [1] => 325257 )      ) ) ~~~