API16:JFile/getName
From Joomla! Documentation
Description
Returns the name, sans any path
<! removed transcluded page call, red link never existed >
Syntax
getName($file)
Parameter Name | Default Value | Description |
---|---|---|
$file |
Returns
string filename
Defined in
libraries/joomla/filesystem/file.php
Importing
jimport( 'joomla.filesystem.file' );
Source Body
function getName($file) {
$slash = strrpos($file, DS);
if ($slash !== false) {
return substr($file, $slash + 1);
} else {
return $file;
}
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples