note 40825 added to function.move-uploaded-file

From: Date: Tue, 16 Mar 2004 07:52:36 +0000
Subject: note 40825 added to function.move-uploaded-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-66890@lists.php.net to get a copy of this message
I need some help! Here is the code: //Taken from the PHP manual //Works perfect! :) $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . $_FILES['userfile']['name']; print "<pre>"; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { print "File is valid, and was successfully uploaded. "; print "Here's some more debugging info:\n"; print_r($_FILES); } else { print "Possible file upload attack! Here's some debugging info:\n"; print_r($_FILES); } print "</pre>"; Well, that works perfect! But the value of $uploaddir is UNIX path! I tried to change to a Windows path according to my needs(like c:/tmp) but it doesn't work(Windows ME, Apache 1.3.20, PHP 4.0.6)! I hope someone will help! May the open source be with you! ---- Manual Page -- http://www.php.net/manual/en/function.move-uploaded-file.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40825 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40825&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40825&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66890) next »