[PHP] Re: Upload wont work
lol... the problem was in this line: move_uploaded_file($_FILES['userfile']['tmp_name'],"c:\\inetpub\\wwwroot\\up load\\".$_FILES['userfile']['name']); I used single backslash.. and thats no good i think ;) "Ragnar" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi and thanx for previous help!!! > > Still a newbie ;) > > I have tried to make the example from php manual working and have the > following code: > > upload.html: > > > > Send this file: > > > > demo_up.php: > > > function upload () > { >if ( is_uploaded_file ($_FILES['userfile']['name'] ) ) >{ > copy($_FILES['userfile']['name'], "/demos/"); >} > >else >{ > echo "File not uploaded: " . $_FILES['userfile']['name']; >} > } > > ?> > > upload(); > ?> > > This always ends up displaying "File not uploadet" + Filename. The file > doesnt seem to upload at all. Im using IIS 5.1 and latest version of php. > > Any ideas? > > Thanx! > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Upload wont work
hmm.. im using fat32, maybe i should convert the partition to ntfs.. "John Holmes" <[EMAIL PROTECTED]> wrote in message 001301c202ad$fcb42f60$b402a8c0@mango">news:001301c202ad$fcb42f60$b402a8c0@mango... > If you're using NTFS, the IUSR_ user has to have write > permissions to that folder. > > ---John Holmes... > > > > -Original Message- > > From: Ragnar [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 23, 2002 6:51 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Re: Upload wont work > > > > It seems that i have passed the original problem.. now i get this > > errormessage: > > > > Warning: Unable to create 'C:\Inetpub\wwwroot\demos': Permission > denied in > > c:\inetpub\wwwroot\demo_up.php on line 7 > > > > This is where i try to copy the uploaded file to the demo directory. > So i > > try to enable write access to the demo directory in IIS, but this has > no > > effect. > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Upload wont work
If you're using NTFS, the IUSR_ user has to have write permissions to that folder. ---John Holmes... > -Original Message- > From: Ragnar [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 23, 2002 6:51 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Upload wont work > > It seems that i have passed the original problem.. now i get this > errormessage: > > Warning: Unable to create 'C:\Inetpub\wwwroot\demos': Permission denied in > c:\inetpub\wwwroot\demo_up.php on line 7 > > This is where i try to copy the uploaded file to the demo directory. So i > try to enable write access to the demo directory in IIS, but this has no > effect. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Upload wont work
It seems that i have passed the original problem.. now i get this errormessage: Warning: Unable to create 'C:\Inetpub\wwwroot\demos': Permission denied in c:\inetpub\wwwroot\demo_up.php on line 7 This is where i try to copy the uploaded file to the demo directory. So i try to enable write access to the demo directory in IIS, but this has no effect. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php