Created
March 7, 2018 17:24
-
-
Save henriquehorbovyi/e804053bbdd7b8ec437792a22469557a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for($i=0; $i<count($_FILES['file']['name']); $i++) { | |
| $tmpFilePath = $_FILES['file']['tmp_name'][$i]; | |
| $shortname = $_FILES['file']['name'][$i]; | |
| $filename = date('YmdHis').$_FILES['file']['name'][$i]; | |
| $filePath = "./public/course_work/".$filename; | |
| $ext = pathinfo($_FILES['file']['name'][$i], PATHINFO_EXTENSION); | |
| $file = basename($shortname,".".$ext); | |
| if(move_uploaded_file($tmpFilePath, $filePath)) | |
| { | |
| //do something... | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment