用TP5框架写了个上传多个文件的表单
HTML代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action="{:url('uploads')}"enctype="multipart/form-data" method="post">
<input type="file" name="image[]" /> <br>
<input type="file" name="image[]" /> <br>
<input type="file" name="image[]" /> <br>
<input type="submit" value="上传" />
</form>
</body>
</html>
PHP代码:
public function uploads(){
$files = request()->f