Tag Archives: full url in php

How to get full URL in php

How to get full URL in php

To get the full URL in PHP, you can use a combination of server variables and PHP functions. Here’s an example: In this example, the $protocol variable checks if the HTTPS server variable is set and equal to ‘on’. If true, it sets the protocol to ‘https://’; otherwise, it sets it to ‘http://’. This handles …