I upload several files. The main function works fine, but I need to change the names of the downloaded files. For example: name1.jpg , name2.jps , name3.jpg , ...
$i = 1; if(move_uploaded_file($_FILES['upl']['tmp_name'], 'uploads/name'.$i++.'.'.$extension)){ echo '{"status":"success"}'; exit; }
The number of $i should increase with the number of downloaded files. I hope this explained correctly.
php file-rename multiple-file-upload
Jani Bolkvadze
source share