How do I get the current URL into a variable?
Posted: Thu Aug 10, 2017 10:02 am
I need to get hold of the URL to identify if it is a /blog/ URL.
I have tried this on PHP7.1, but it is echoing nothing.
What am I doing wrong?
I have tried this on PHP7.1, but it is echoing nothing.
Code: Select all
<?php
echo "The query string is: ".$_SERVER['QUERY_STRING'];
?>