copy after upload pblm (?path?)

From: Date: Sun, 19 May 2002 17:22:22 +0000
Subject: copy after upload pblm (?path?)
Groups: php.general 
Request: Send a blank email to php-general+get-98368@lists.php.net to get a copy of this message
Hi all, I' m trying to copy an uploaded file: if(!empty($fichier)) { $nom = $HTTP_POST_FILES["fichier"]["name"]; $type = $HTTP_POST_FILES["fichier"]["type"]; $taille = $HTTP_POST_FILES["fichier"]["size"]; $nom_tmp = $HTTP_POST_FILES["fichier"]["tmp_name"]; echo "nom : $nom <br> type : $type <br> taille : $taille <p> nom temporaire : $nom_tmp</p>; if(!strpos($nom, .gif") === FALSE || !(strpos($nom, ".jpg") === FALSE)){ ---> $res = copy($fichier,$nom); if ($res != 0) { $msg = "<p> File save </p>"; }else{ $msg = "<p> saving Error </p>"; } }else{ $msg = "<p> wrong type </p>"; } ?> and i get the error "Warning: open_basedir restriction in effect. File is in wrong directory in d:\tsunami\zeg\9\exo4upload.php on line 5" so is there any wrong path for $res = copy($fichier,$nom); should i use an absolute path? TIA

« previous php.general (#98368) next »