move_uploaded_file

From: Date: Fri, 11 Dec 2009 18:09:39 +0000
Subject: move_uploaded_file
Groups: php.general 
Request: Send a blank email to php-general+get-300388@lists.php.net to get a copy of this message
Am I just drunk or blind or the documentation is simply wrong? From the official doc (http://uk2.php.net/manual/en/function.move-uploaded-file.php): <?php $uploads_dir = '/uploads'; foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"][$key]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); } } ?> The path for the upload dir should be a relative one, not an absolute one. Roberto Aloi http://aloiroberto.wordpress.com Twitter: @prof3ta

« previous php.general (#300388) next »