经测试代码如下:
/**
* 获取指定路径的最后一个参数
*
* @param
* @arrange (512.笔记) jb51.cc
**/
function path_get_last_arg($path){
$path = str_replace('\\','/',$path);
$path = preg_replace('/\/+$/','',$path);
$path = explode('/',$path);
$l = count($path)-1;
return isset($path[$l]) ? $path[$l] : '';
}
/*** 来自编程之家 jb51.cc(jb51.cc) ***/