标签:
$path = "/home/httpd/html/index.php"; $file = basename($path); // $file is set to "index.php" $file = basename($path,".php"); // $file is set to "index"
dirname:
$path = "/etc/passwd"; $file = dirname($path); // $file is set to "/etc"
一个是取出目录名
一个是取出文件名
标签:
原文地址:http://www.cnblogs.com/qinqiu/p/4532891.html