如何使用PHP将上传的文件链接到自己的文件夹

时间:2018-10-29 13:06:35

标签: php mysql file

我正尝试将多张图片上传到我的文件夹@if(Route::currentRouteName()=="operator-about") @include('operator.sidebar') 并获取该图片的链接(images,...)。

当前代码不想将任何图像上传到我的$image_0文件夹中。

我该如何解决?

HTML

images

PHP

<form method='POST' enctype='multipart/form-data'>
  <input type='file' name='image[]' accept='image/*' multiple/>
  <button type='submit'>Submit</button>
</form>

1 个答案:

答案 0 :(得分:0)

更改此行:

[0]

收件人:

<input type='file' name='file[]' accept='image/*' multiple/>

希望我能对您有所帮助。享受它。