note 33486 added to features.file-upload
| From: | ashrsak at msn dot com | Date: | Fri, 27 Jun 2003 12:36:53 +0000 |
| Subject: | note 33486 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51091@lists.php.net to get a copy of this message | ||
when is try to use the function move_uploaded_file(string,string) i get the messages:
Warning: move_uploaded_file(C:/Program Files/Apache Group/Apache2/htdocs\MySite): failed to open
stream: Permission denied in C:\Program Files\Apache Group\Apache2\htdocs\MySite\add_product.php on
line 7
Warning: move_uploaded_file(): Unable to move 'D:\WINDOWS\TEMP\php52.tmp' to
'C:/Program Files/Apache Group/Apache2/htdocs\MySite' in C:\Program Files\Apache
Group\Apache2\htdocs\MySite\add_product.php on line 7
my code:
<?php
$root=$_SERVER['DOCUMENT_ROOT'];
$root .= "\MySite";
$filename=$_FILES['desc']['name'];
$tmp=$_FILES['desc']['tmp_name'];
if(move_uploaded_file($tmp,$root)){
echo "File $filename uploaded...<br>";
}
else{
echo "File $filename NOT uploaded...<br>";
}
?>
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33486
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33486&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33486&report=yes