Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- File upload issue


1888software - 8:36 pm on Jan 13, 2012 (gmt 0)


eelixduppy's idea is an excellent one. The W3C states:

[w3.org...]
"There is no limit in the Web specifications to the graphical formats that can be used on the Web. You just need a MIME type so that the format is labelled correctly for transfer across the Web, and so that a suitable viewer (if one exists) can be located at the other end.

In practice, certain formats are more widely understood than others; certain formats are more suited to one type of graphical data than another; so you should make an informed choice about what format to use."

The 3 (arguably) most prevalent and browser supported image formats do not include .bmp and do include .jpg, .png and perhaps .gif

This is code I've used for years it includes a few other application supported formats:

$allowed=array('jpg','gif','png','ppt','wav','pdf','mp3','wmv','mp4','mpg','avi','mov');

I observe that the W3C is also big on svg as per the above link.


Thread source:: http://www.webmasterworld.com/php/4406119.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com