note 40825 deleted from function.move-uploaded-file by nlopess

From: Date: Tue, 16 Mar 2004 14:47:49 +0000
Subject: note 40825 deleted from function.move-uploaded-file by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66916@lists.php.net to get a copy of this message
Note Submitter: kmakaveev(at)yahoo.com ---- 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!

« previous php.notes (#66916) next »