Skip to content

Instantly share code, notes, and snippets.

@zerobugs-oficial
Created June 18, 2020 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerobugs-oficial/1257212e994b71ee86db1f9a215f77bc to your computer and use it in GitHub Desktop.
Save zerobugs-oficial/1257212e994b71ee86db1f9a215f77bc to your computer and use it in GitHub Desktop.
Como pegar a URL atual usando PHP
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