Get the Current URL in PHP Posted on November 1, 2017 by Chandan Sharma in CodeIgniter, 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:TwitterFacebook Published by Chandan Sharma View all posts by Chandan Sharma