1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
echo "<form name=formFichier enctype=multipart/form-data action=envoyerFichier.php method=post><br/>";
echo "<input type=file name=fichier><br/><br/>";
echo "<input type=submit value=Envoyer>";
if(!empty($_FILES["fichier"]))
{
echo "<br/><br/>Un fichier";
$monFichier = $_FILES["fichier"];
$destination = "C:\Jul\\";
echo $monFichier;
move_uploaded_file($monFichier,$destination);
if(copy($monFichier,$destination))
echo "<br/>L'upload a réussi";
else
echo "<br/>L'upload a échoué";
} |