PHP Get the Current Page URL
来源:互联网 发布:js print setup 插件 编辑:程序博客网 时间:2024/05/19 02:00
有时,您可能想要在浏览器中显示当前页面URL网址窗口
将以下代码添加到一个页面:
<?phpfunction curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL;}?>调用
<?php echo curPageURL();?>
0 0
- PHP Get the Current Page URL
- PHP: How to Get the Current Page URL
- Get the self URL of current page
- get current url in current page
- DoSave save the current page
- Get current URL with JavaScript?
- Get current URL in JavaScript?
- Finding a Custom Object Id (01I…) to get the Setup page URL
- Page not found (404) Request Method:GET Request URL:http://127.0.0.1:8000/blog/talks Using the URL
- Android open url ,and get page
- How to get the current epoch time
- php get url
- Use Jquery to get json data from the server-side php page
- Highlighting the Current Page in a Navigating Bar
- Get the page name in asp.net web page
- Java - Get the information of the current thread
- get the base application URL?
- Get URL from the text
- 多线程与并发服务器设计(23-1)
- 生成模型与判别模型的关系
- List of Values (LOV)
- 学习网站
- patricia_tree树的特征
- PHP Get the Current Page URL
- javascript正则表达式,jquery正则
- Cannot run program "python"问题解决
- JS判断手机号是否正确(正则表达式)
- MVC4中AJAX Html页面打开调用后台方法实现动态加载数据库中的数据
- c++基础学习4-c++函数b
- ls命令
- Hibernate查询之HQL查询
- muduo_net库源码分析