CodeIgniter / PHPGet the Current URL in PHP November 1, 2017 Chandan SharmaComment on Get the Current URL in PHPGet the Current URL in PHP Both HTTP and HTTPS, $CURRENT_PATH = (isset($_SERVER[‘HTTPS’]) ? “https” : “http”) . “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;Share this:FacebookX