Created
April 11, 2016 10:46
-
-
Save lemonlab/6c9da6a23740d209e3036a421c31fc9f 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
<?php | |
// Dossier de destination | |
$target_dir = "uploads/"; | |
// Nom du fichier envoyé | |
$filename = basename($_FILES["file"]["name"]); | |
// Chemin de destination complet (dossier + fichier) | |
$target_file = $target_dir . $filename; | |
// Déplace le fichier envoyé dans le bon dossier | |
move_uploaded_file($_FILES['file']['tmp_name'], $target_file); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment