PHP 函数 basename()
PHP 函数 basename()
<?php
$path = "/home/httpd/html/index.php";
$file = basename($path);
echo "File name is $file\n";
$file = basename($path, ".php");
echo "File name is $file\n";
?>
<?php
$path = "/home/httpd/html/index.php";
$file = basename($path);
echo "File name is $file\n";
$file = basename($path, ".php");
echo "File name is $file\n";
?>