Table of Contents

stripExt

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage FileSystem Class JFile Method stripExt Reference stripExt() Never Work in Progress

Strips the last extension off a file name. This function will remove the last ‘.’ and all following characters from the string.

Syntax

string stripExt ( $file )

$file string is a string containing the file name.

Examples

Example: This example reads the robot.txt file.

Example

echo JFile::stripExt( 'application.html.php' );

which might produce something like:

Result

application.html