[Klug-general] PHP Uploads

Karl Lattimer karl at nncc.info
Tue Feb 15 09:11:54 GMT 2005


Kevin I have the code you seek, but not with me at present, I can email
you it later on tonight...

file uploads are a strange one in php, but not too difficult to master.

Karl,

On Tue, 2005-02-15 at 09:04 +0000, Alex A. Smith MCP wrote:
> What encoding type do you have set on the form?
> 
> in theroy this should upload a file - wont do any moving of the file from 
> the temp folder tho but i'll assume that your doing that already. if not i 
> can post that too.
> 
> <form enctype="multipart/form-data" method="post">
> <input type="hidden" name="MAX_FILE_SIZE" value="51200">
> <input type="file" name="fupload"><br>
> <input type="submit" value="Upload">
> </form>
> 
> Alex
> 
> ---
> Alex A. Smith
> IT Tech Temple School, Rochester
> Web Host - ASMHosting.com
> General IT lay about
> ----- Original Message ----- 
> From: "Kevin Groves" <kgroves at ksoft-creative-projects.co.uk>
> To: "Kent Linux User Group - General Topics" <kent at mailman.lug.org.uk>
> Sent: Monday, February 14, 2005 10:35 PM
> Subject: [Klug-general] PHP Uploads
> 
> 
> > Hi,
> >
> > This is driving me mad. Note sure if it's a system config error, it's late 
> > and I'm tired or my PHP is wrong....
> >
> > Trying to upload a file with the <input type="file" name="testfile"> tag.
> >
> >
> > I gather I should have, on page submission some global vars such as 
> > 'testfile', 'testfile_name' and 'testfile_size'. Is that right?
> >
> > I try to echo them but get nothing. There is no suitable pause on page 
> > submission to sugest the files are being upload (ok local webserver but I 
> > should get something) even with a half meg file. It just returns 
> > instantly.
> >
> > My php.ini does have 'upload file' switched on and there no files being 
> > thrown away in I can see them.
> >
> > For this to work do I *have* to process the data stream which is why the 
> > page is falling out? I hate this is kind of thing, it's *SO* easy doing 
> > this in Coldfusion!
> >
> > Thanks for any pointers....
> >
> > Kev,
> >
> >
> > _______________________________________________
> > Kent mailing list
> > Kent at mailman.lug.org.uk
> > http://mailman.lug.org.uk/mailman/listinfo/kent
> >
> > 
> 
> 
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/kent
> 




More information about the Kent mailing list