Re: Files uploads problem

From: Date: Tue, 01 Apr 2003 11:35:05 +0000
Subject: Re: Files uploads problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-141892@lists.php.net to get a copy of this message
Thank you very much - you are very observant and have just taught me a good lesson about checking minor errors even outside the obvious PHP code. It works now except for the unlink as you said. Regards Adrian Greeman ---- Original Message ----- From: "Kevin Stone" <kevin@helpelf.com> To: "Adrian Greeman" <adriangreeman@pixandwords.freeserve.co.uk>; <php-general@lists.php.net> Sent: Monday, March 31, 2003 11:37 PM Subject: Re: [PHP] Files uploads problem > > ----- Original Message ----- > From: "Adrian Greeman" <adriangreeman@pixandwords.freeserve.co.uk> > To: <php-general@lists.php.net> > Sent: Monday, March 31, 2003 3:04 PM > Subject: [PHP] Files uploads problem > > <snip> > > > > But I am having real trouble making a file upload programme work. It needs > > substitution of $FileName given in the example with $_FILES array values > > which I have done and use of isset instead of a raw if(). But I still > > cannot get it to work > > > > May I put the code here and ask if anyone can tell me the problem. ..............................> > > Couple of HTML problems to point out. Where you have "<br /></ form>\n", </ > form> is an invalid tag. Remove the space. Also where you have > "enctype=\multipart/form-data\>" you need quotes after the slashes (ie. \") > otherwise PHP is going to assume that you want the litteral slash in the > HTML. > > Niether of these errors will return visable error code but both will result > in you not being able to submit the form. > > Also when you go to unlink($File); you're going to see an error becuase > $File is not a valid file path, it's an array. Besides you shouldn't worry > about trying to clean up the temp file. PHP will do it automatically when > the script exists. :-) > > HTH, > Kevin </snip> > > >

« previous php.general (#141892) next »