Feb
18
2011

PHP File Upload Issue

Hello All

Today I was working with one of my collegue and come to know a very strange fact about PHP.

If you have a form with upload file. For e.g

<form method='GET' enctype='multipart/form-data' >
File to upload: <input type='file' name='upfile' />
<br>
Notes about the file: <input type='text' name='note' /><br>
<br>
<input type='submit' value='Press' /> to upload the file!
</form>

And On Submit you want to get $_FILE, then there will occur a problem :-)

If the file is corrupt then it will not get anything…

Hope this helps you.

Cheers

Related Posts

About the Author: Muhammad Farhan Bashir

I am so clever that sometimes I don't understand a single word of what I am saying.

19 Comments + Add Comment

  • fantastic

    • Great thinking! That relaly breaks the mold!

    • And I thuohgt I was the sensible one. Thanks for setting me straight.

  • Image Exif data is quite useful to for image forensics. But EXIF data won’t tell you too much – the user might have loaded the photo into something like Photoshop just to crop it the way he wanted. Site Photoshopped Image Killer is beyond that, it mines structural information from image content and classifies image as original or altered based on that.

    • If information were soccer, this would be a gooooaol!

    • If you’re reading this, you’re all set, padnerr!

  • Hi !

    • Yup, that sohlud defo do the trick!

    • With the bases loaded you struck us out with that anwser!

  • Very true! Makes a change to see smoonee spell it out like that. :)

    • Just cause it’s simple doesn’t mean it’s not super hlpeful.

    • I watend to spend a minute to thank you for this.

  • I’m out of leguae here. Too much brain power on display!

    • I suppose that snouds and smells just about right.

    • Thanks for sharing. What a plsearue to read!

  • Surely a perfect piece of writing! We’ve book marked it and sent it out to all of my friends since I know they’ll be intrigued, thank you very much!
    My blog is on Wedding ideas.

    • Hot damn, looking pertty useful buddy.

    • It’s really great that people are sharing this ifnomartoin.

  • As for Sci Fi, well, I never really thought I liked the genre at all. But after reading todays blog, I realized not only have I read and loved some classic Sci Fis (Brave New World, Wrinkle In Time), I am now obsessed with a Sci Fi television show. Heroes! It is the best TV show to come along in a very long time, in my humble opinion. Glenn and are all caught up, lets talk!

Leave a comment


+ seven = 8