Upload multiple files via html input
Posted: Wed Jun 01, 2016 9:35 am
Hi! I need help about getting multiple files uploaded to the server. I am using HTML form for the upload.
E.g. upload.lc:
I tried to "print" the filename of the uploaded files, but they are showing empty.
uploaded.lc
I'm not sure if I'm getting the idea right...
E.g. upload.lc:
Code: Select all
...
<form enctype="multipart/form-data" action="uploaded.lc" method="POST">
Choose at least one file to upload: <input type="file" name="uploadedfile[]" multiple><br />
<input type="submit" value="Upload File" />
</form>
...
uploaded.lc
Code: Select all
<?lc
put $_FILES['uploadedfile']['name'][0]
put $_FILES['uploadedfile']['name'][1]
?>