To get current full url in php, we can use php's
We are going to use
Have any doubt, feel free to comment here!
Related Post : How to get full referrer url in php
$_SERVER
variables.We are going to use
$_SERVER[REQUEST_SCHEME]
- It will print which type scheme (ex.http)
$_SERVER[HTTP_HOST]
- Server host name
$_SERVER[REQUEST_URI]
- current URI
$URL = $_SERVER[REQUEST_SCHEME].'://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI];
Simply echo it like this echo $_URL;
to test it.Have any doubt, feel free to comment here!
Related Post : How to get full referrer url in php
0 comments:
Post a Comment