![]() |
|
#1
|
||||
|
||||
VALIDATING file types on an PHP upload script?I was working on an uploading process off a script I am writing and got stuck trying to validate the uploaded file type.
The script is supposed to only accept .gif, .jpg and .png files. I thought it would be simple just checking the $_FILES['file']['type'] value but was shocked to find that it's browser-dependent! So I checked 3 popular browsers: Opera, MSIE and Mozilla and so far this is what I collected: PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP script to show last referrer url and top referrer to your site | jrobbio | MySQL / PHP Forum | 6 | 22-May-2006 01:06 |
| [script] Password Protect web pages/site using PHP and MySQL | JdS | PHP Code Library | 0 | 23-Jul-2003 10:02 |
| All the big PHP script collections that matter | jrobbio | MySQL / PHP Forum | 5 | 06-Jun-2003 16:14 |
| How Do i get php to find out the file type of a file for me? | viperman95833 | MySQL / PHP Forum | 2 | 08-Mar-2003 09:48 |
| PHP Script | pcxgamer | MySQL / PHP Forum | 6 | 10-Jan-2003 06:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The