Example
Return filename from the specified path:
<?php
$path = "/testweb/home.php";
//Show filename
echo basename($path) ."<br/>";
//Show filename, but cut off file extension for ".php" files
echo basename($path,".php");
?>
The output of the code above will be:
home.php
home