How to Get the Current Page URL
Posted by Stan in
PHP on 03 1st, 2009 |
No Comments
In some cases, you might want to get the current URL of the script that is being executed. I haven’t yet found a convenient one-line function that is built-in into PHP and thus I’ve wrote the following function to do it:
/**
* Returns the current URL of the script.
* Usage: $url = cur_page_url();
...