You must use absolute path names "c:\\..." in copy(). As a matter of personal hygiene, I would not recommend to use file/ dir names containing spaces in your document root directory (or any place that the PHP user must have access). Why not try c:/apache/htdocs ? Ignatius ----- Original Message ----- From: "Stephen K Knight" <stephen@fmwebschool.com> To: <php-db@lists.php.net> Sent: Friday, March 07, 2003 6:06 PM Subject: I'm almost there! Just a little more help > Below is all of my code. The first is my html page that calls my php page. > I do not know php well enough to edit the code to make this work. I need > the image to go to a folder called "logos" on my C drive. The actual path > is: > C:\Program Files\Apache Group\Apache2\htdocs\logos > > Could someone please make the changes to my code so that it will work! > Thank you Thank you!!! > > ********HTML Page*********** > <html> > > <form action="fileupload2.php" method=post enctype="multipart/form-data"> > submit this file: <input type=file name="userfile"><br> > rename to: <input type=text name="newname"><br> > <input type=submit><br> > </form> > </html> > > **********PHP Page ************* > <? > > if(!empty($userfile)) > { > $abpath = "logos/" . $newname; > > echo "FileUpload2.php"; > echo $username; > echo $newname; > echo $abpath; > > //copy the file > // copy($userfile, "$abpath"); > > //destroy the uploaded file > // unlink($userfile); > > // write javascript to store the newname > // echo "<script language='javascript'>\n"; > // echo "newname = '" . $newname . "';\n"; > // echo "</script>\n"; > } > > ?> > > If someone could fix this I would greatly greatly apreciate it! > > In Kindness > Stephen K Knight > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php