PDA

View Full Version : URL Variable in templates?


Antun
07-29-2002, 04:22 PM
Is there any way to access the URL of the current page from a template (either by from the web root OR the full http://...)?

Thanks,

Antun

Admin
07-29-2002, 06:29 PM
This will work if you have PHP 4.1.0 or above:
http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]
If you don't, you can use this:
http://$HTTP_SERVER_VARS[HTTP_HOST]$HTTP_SERVER_VARS[REQUEST_URI]
BUT it will not work in all templates.