Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检索 ie 的片段: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
提前致谢。
$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