Sözdizimi:
string basename ( string $path [, string $suffix ] )
$path parametresi ile verilen adresteki dosya adını döndürür.
Örnek:
<?php
$yol = “/home/httpd/html/index.php”;
$dosyaAdi = basename($yol); // Çıktı: “index.php”
$dosyaAdi = basename($yol, “.php”); // Çıktı: “index”
?>