basename() public static method
Returns the trailing name component of a path.
This method is similar to the php function basename()
except that it will treat both \ and / as directory separators, independent of the operating system. This method was mainly created to work on php namespaces. When working with real file paths, php's basename()
should work fine for you. Note: this method is not aware of the actual filesystem, or path components such as "..".
See also http://www.php.net/manual/en/function.basename.php.
public static string basename ( $path, $suffix = '' ) | ||
---|---|---|
$path | string |
A path string. |
$suffix | string |
If the name component ends in suffix this will also be cut off. |
return | string |
The trailing name component of the given path. |
Please login to continue.