PHP basename() 函数

实例

$path = "/testweb/home.php";

//显示带有文件扩展名的文件名

echo basename($path);

//显示不带有文件扩展名的文件名

echo basename($path,".php");

?>

输出:

home.php

home

[an error occurred while processing the directive]