The first paragraph is a get url without parameters The second paragraph is to get the complete url function Oh, if you are looking for url parameter code Oh.
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; } ?> In addition, there is a slight difference between $ _ server ['request_uri'] and $ _server ['request_url']: $ _server ["request_uri"] returns the full path (/directory/file.ext?query=string) $ _server ['request_url'] only returns the path of the file, excluding parameters (/directory/file.ext), which is about the same as $ _server ['php_self'], except that on some servers $ _server ['request_url'] is not available
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.