note 33486 rejected from features.file-upload by pollita

From: Date: Fri, 27 Jun 2003 15:12:24 +0000
Subject: note 33486 rejected from features.file-upload by pollita
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51102@lists.php.net to get a copy of this message
Note Submitter: ashrsak@msn.com ---- 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>"; } ?>

« previous php.notes (#51102) next »