PHP如何获取当前页完整URL及其参数
- <?
- echo 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]."<br>";
- echo $_SERVER['SERVER_NAME']."<br>";// cike.org
- echo $_SERVER["SERVER_PORT"]."<br>";// 8080
- echo $_SERVER["REQUEST_URI"]."<br>";// /index.php?id=2
- ?>
ASP如何获取当前页完整URL及其参数
- <%
- url=Request.ServerVariables("server_name")&Request.ServerVariables("path_info")
- url=Request.ServerVariables("server_name") ' cike.org
- url2=Request.ServerVariables("path_info") ' /index.asp
- %>