oui j'ai essayé de changer les droits du repertoire destination mais c pareil!!!
Voici le code:
Recuperation de l'image:
<form name="form" action="new_article.php" method="post" enctype="multipart/form-data">
Photo <input name="photo" type="file" size="10" maxlength="20">
...
</form>
envoi de l'image: (dans le fichier new_article.php)
// Taille maximum
$MAX_FILE_SIZE = 1000000;
// Dossier de destination du fichier
$folder = "images/";
// Tableau array des différents types
$allowed_types = array("image/bmp", "image/gif", "image/pjpeg", "image/jpeg", "image/jpg");
// Variables récupérée par methode POST du formulaires
$fname = $HTTP_POST_FILES['photo']['name'];
$ftype = $HTTP_POST_FILES['photo']['type'];
$fsize = $HTTP_POST_FILES['photo']['size'];
$ftmp = $HTTP_POST_FILES['photo']['tmp_name'];
// Diverses test afin de savoir si :
// Le format de fichier correspond à notre tableau array
if(!in_array($ftype, $allowed_types)){$error = 1;}
// La taille du fichier n'est pas dépassée
if($fize > $MAX_FILE_SIZE){$error = 2;}
// Le fichier n'existe pas déjà
if(file_exists($folder."m_".$fname)){$error = 3;}
//chmod($folder, 0777); changement des droits repertoire destination
// Si tout va bien, on copie l'image
if(copy($ftmp,''.$folder.''.$fname.'')) {$error = 0;}
...
j'ai eu à remplacer copy par move_uploaded_file() mais rien n'y fait.
Donc Voilà ...