how to upload image and rename in php

Solutions on MaxInterview for how to upload image and rename in php by the best coders in the world

showing results for - "how to upload image and rename in php"
Niclas
01 Oct 2019
1$temp = explode(".", $_FILES["file"]["name"]);
2$newfilename = round(microtime(true)) . '.' . end($temp);
3move_uploaded_file($_FILES["file"]["tmp_name"], "../img/imageDirectory/" . $newfilename);