note 41641 added to function.filetype
| From: | kristian at nybro dot dk | Date: | Sat, 17 Apr 2004 21:36:23 +0000 |
| Subject: | note 41641 added to function.filetype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68265@lists.php.net to get a copy of this message | ||
If you need the EXTENSION of a file you can use this small function:
string getExt(string filename)
<?php
function getExt($file)
{
if ($temp=strrchr($file, "."))
return substr($temp,1);
else
return "";
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.filetype.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41641
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41641&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41641&report=yes
Search -- http://master.php.net/manage/user-notes.php