Bonjour,
Je n'arrive pas à uploader de fichier sur mon site hebergé par 1and1, or ça fonctionne en local!
Le message que je reçois!
[phpBB Debug] PHP Notice: in file /homepages/5/d224217265/htdocs/photos/sendphotos.php on line 16: move_uploaded_file(/kunden/homepages/5/d224217265/htdocs/photos/photos_recentes/test.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory
[phpBB Debug] PHP Notice: in file /homepages/5/d224217265/htdocs/photos/sendphotos.php on line 16: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpucdCVy' to '/kunden/homepages/5/d224217265/htdocs/photos/photos_recentes/test.jpg'
Droits en écriture du dossier photos_recentes: 777
Code du formulaire et de l'envoi
<form method="POST" action="../index/index.php?page=sendphotos" enctype="multipart/form-data">
<p>Photo 1: </p><p><input type="file" size="30" name="fichier_a"/></p>
<input type="submit" size="50" name="submit" value="Envoyer les photos">
if(isset($_FILES['fichier_a'])) $fichier_a=$_FILES['fichier_a']['name']; else $fichier_a="";
$dest_dossier = $_SERVER['DOCUMENT_ROOT'].'/photos/photos_recentes/';
move_uploaded_file($_FILES['fichier_a']['tmp_name'], $dest_dossier.$_FILES['fichier_a']['name']);
Code réduit au minimal pour les tests
Sinon le phpinfo de 1and1 me donne:
upload_max_filesize 20M
upload_tmp_dir no value
user_dir no value
Merci au utilisateurs de 1and1 pour vos tuyau si vous arrivez à uploader! ;-)
--