Commit bc39ab25 by sopham

the avatar

parent 6eede0c5
Showing with 3 additions and 3 deletions
......@@ -8,9 +8,9 @@
if(is_uploaded_file($_FILES['file']['tmp_name'])) {
//save source and target to variables
$sourcePath = $_FILES['file']['tmp_name'];
$targetPath = "upload/".basename($_SESSION['name'].'.'.end((explode(".", $_FILES['file']['name']))));
$sourcePath = $_FILES['file']['tmp_name'];
$targetPath = "upload/".$_FILES['file']['name'];
//move uploaded file to target folder
if(move_uploaded_file($sourcePath, $targetPath)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment