API16

JFile/getExt

From Joomla! Documentation

< API16:JFile
Revision as of 00:07, 13 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Gets the extension of a file name

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

getExt($file)
Parameter Name Default Value Description
$file $file The file name

Returns[edit]

string The file extension

Defined in[edit]

libraries/joomla/filesystem/file.php

Importing[edit]

jimport( 'joomla.filesystem.file' );

Source Body[edit]

function getExt($file) {
        $dot = strrpos($file, '.') + 1;
        return substr($file, $dot);
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />