note 28841 added to function.filetype
| From: | webmaster at freetimeprojects dot com | Date: | Sat, 25 Jan 2003 15:41:38 +0000 |
| Subject: | note 28841 added to function.filetype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42729@lists.php.net to get a copy of this message | ||
This is my way to recover the extension.
$str = explode(".",$file); // Break it in pieces.
$ext = end($str); // The last one has to be the extension.
Use the array fuction end() to put the pointer at the last element in the array to find the
extension.
Robert.
--
http://www.php.net/manual/en/function.filetype.php
http://master.php.net/manage/user-notes.php?action=edit+28841
http://master.php.net/manage/user-notes.php?action=delete+28841
http://master.php.net/manage/user-notes.php?action=reject+28841