note 56078 deleted from function.is-file by derick

From: Date: Fri, 04 Aug 2006 11:11:45 +0000
Subject: note 56078 deleted from function.is-file by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-115543@lists.php.net to get a copy of this message
Note Submitter: mariodivece at bytedive dot com ---- Hi... just a neat way of showing up file icons that correspond to their mimetypes Here's the code: <?php function mimetypeicon($mimetype) { $newmime = str_replace('/','-',$mimetype); if(is_file('images/16x16/gnome-mime-'.$newmime.'.png')) { return 'images/16x16/gnome-mime-'.$newmime.'.png'; } else { //The mimetype icon was not found return 'images/16x16/gnome-mime-text.png'; } } ?>

« previous php.notes (#115543) next »