I haven't done but one file upload, but it seems from the error message that maybe PHP is trying to write the file to d:\raheel\w3sites\txtfiledemo\uploads\ (as a file?). Perhaps you should include the $_FILES['userfile']['name'] to the ending statement (which I believe is what the file's original name was).
Worth a try at least. (I may be wrong on the $_FILES['userfile']['name'] - try print_r($_FILES); and see what is in that array). -Dash Fashion is a form of ugliness so intolerable that we have to alter it every six months. -- Oscar Wilde On Sat, 23 Nov 2002, Raheel Hussain wrote: > > hi, > I got a problem in a simple file upload in a php file , i have two pages and i m >writing the code here as bellow > > ::page1.php:: > <html> > <head> > </head> > <body> > <form name="f" method="post" enctype="multipart/form-data" action="default2.php"> > <input type="hidden" name="MAX_FILE_SIZE" value="78728"> > Send this file: <input name="userfile" type="file"> > <input type="submit" value="Send File"> > </form> > <body> > <html> > > ::default2.php:: > move_uploaded_file($_FILES['userfile']['tmp_name'], >"D:\\Raheel\\W3sites\\txtfiledemo\\uploads\\"); > print($_FILES['userfile']['error']); > > > :: on default2.php i have the following error, which i can't figure out :: > > Warning: Unable to create 'D:\W3sites\txtfiledemo\uploads\': Permission denied in >D:\W3sites\txtfiledemo\default2.php on line 9 > > Warning: Unable to move 'c:\php\uploads\php76.tmp' to >'D:\W3sites\txtfiledemo\uploads\' in D:\W3sites\txtfiledemo\default2.php on line 9 > 0 > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php