<?php
function php_self(){
$php_self=substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
return $php_self;
}
?>
复制代码
函数使用方法:
<?php
$phpself=php_self();
echo $phpself;
?>
复制代码
http://jingyan.baidu.com/article/20b68a8851c91e796dec6255.html
substr(string,start,length)
从字符串中返回 “world”:
<?php
echo substr("Hello world",6);
?>
复制代码