Created
June 18, 2020 16:00
-
-
Save zerobugs-oficial/1257212e994b71ee86db1f9a215f77bc to your computer and use it in GitHub Desktop.
Como pegar a URL atual usando PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_url(){ | |
return strtolower(preg_replace('/[^a-zA-Z]/','',$_SERVER['SERVER_PROTOCOL'])).'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment