| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
FileSystem |
JFile |
getExt |
getExt() |
Never | Work in Progress |
Gets the extension of a file name. The function returns all the characters after the last ‘. ' in the string.
string getExt ( $file )
| $file | string | is a string containing the file name. |
Example: This example gets the extension of a file.
Example
echo JFile::getExt( 'images/stories/clock.jpg' );
which will produce:
Result
jpg