PHP中的_SERVER[PHP_SELF]与$PATH_INFO

piaoling  2011-02-04 17:23:09
前面的$_SERVER[PHP_SELF]返回的是一段信息,如“/upload/try.php”
而后面的则返回一个数组:
如:

$path_parts = pathinfo('index.html');
echo $path_parts['dirname'], " ";
echo $path_parts['basename'], " ";
echo $path_parts['extension'], " ";
echo $path_parts['filename'], " "; // since PHP 5.2.0


将返回:
/upload
index.html
html
index


  

类别 :  PHP(78)  |  浏览(3154)  |  评论(0)
发表评论(评论将通过邮件发给作者):

Email: