标签: php
我想检索一下:www.something.com/something2/something3/page1.php?var1=1&var2=2
www.something.com/something2/something3/page1.php?var1=1&var2=2
确切地说,如何从上面'page1.php'获取$_SERVER。
'page1.php'
$_SERVER
提前致谢。
答案 0 :(得分:4)
$path = parse_url('www.something.com/.../page1.php?var1=1&var2=2', PHP_URL_PATH); echo basename($path);
http://php.net/parse_url http://php.net/basename