Y
Hacker News
new
|
ask
|
show
|
jobs
by
Udo
5434 days ago
For most purposes, this would work. If you want to be extra safe, you can call getimagesize() on the file - this returns among other things the actual mime type of the file, allowing you to exclude anything but real image files.