PHP code example of eeshiro / file-upload
1. Go to this page and download the library: Download eeshiro/file-upload library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eeshiro / file-upload example snippets
$upload = new FileUpload;
$single_file = $upload->validate('single_file', 'Single File')
->, 'Multiple File')
->ors('<br>');
die();
}
$upload->move_uploaded_file($single_file, 'directory/filename.txt');
foreach ($multiple_file as $key => $file) {
$upload->move_uploaded_file($file, 'directory/'.$file['name']);
}