bonjour,
comment je peux uploader (envoyer) des fichiers ayant la taille supérieur à 2Mo ?
j'ai précisé la taille "
999999999" !
voila le code que j'ai fait mais ça marche pas ?
************************** fichier Ajout.php ***********************************
<form enctype="multipart/form-data" method="post" action="check_ajout.php">
.................
.................
<tr>
<td><font size=3 face="Papyrus" color=ffffff> fichier : </td>
<td>
<input type="hidden" name="MAX_FILE_SIZE" value='
999999999' />
<input name="fichier" type="file" ><br >
</td>
</tr>
.............
************************** fichier check_ajout.php ***********************************
<?php $fname = $_FILES['fichier']['name'];
if(file_exists("
/$fname")){echo "
fichier existe deja ! renommer le ! <br> <a href='ajouter_cours.php'> retour </a><br>";exit();}
$target_path = "
/";
$target_path = $target_path . basename( $_FILES['fichier']['name']);
if(move_uploaded_file($_FILES['fichier']['tmp_name'], $target_path)) {
echo "
le fichier ". basename( $_FILES['fichier']['name']). "
est envoyé !<br>";
}
else{
echo "
il y a une erreure !<a href='ajouter_cours.php'> retour </a><br>";
}
?>