Bonjour,
Je cherche à uploader un fichier via l'URL d'un fichier PHP.
Je précise : sans passer le nom du fichier dans un formulaire HTML !
J'essaie d'ouvrir une URL comme :
http://coocs.eu.md/coocs.php?ReqCooc...oc-requete.xml
Pour l'instant, mon application php récupère bien la variable ReqCoocXML, mais
d'après le message affiché, je ne sais pas si le chargement échoue par ma faute ou par une limitation du serveur :
Ce qui produit l'affichage :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 $ReqCoocXML = $_GET['ReqCoocXML']; $target_path = "uploads/"; $target_path = $target_path . basename($ReqCoocXML); echo $ReqCoocXML, "<br>"; echo $target_path, "<br>"; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "There was an error uploading the file, please try again!"; }
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/C:\cooc-requete.xml) is not within the allowed path(s): (/home/dothost.eu/vhosts/:/var/lib/php:/usr/lib/php:/usr/local/lib/php:/tmp/:/usr/share/pear/) in /home/dothost.eu/vhosts/coocs.eu.md/coocs.php on line 65
Partager