Hi,
Is there a way to find out (using php) what page a visitor is currently on?
e.g. the visitor is on http://www.thisurl.com/this_page.html, i want to use this info within the site as $currenturl
Did i explain that well?!?
Cheers.
Hi,
Is there a way to find out (using php) what page a visitor is currently on?
e.g. the visitor is on http://www.thisurl.com/this_page.html, i want to use this info within the site as $currenturl
Did i explain that well?!?
Cheers.
The global variables $PHP_SELF and $_SERVER['REQUEST_URI'] and the constant __FILE__ should help you.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Thanks Twey, but that only shows the file names or root..
I want to be able to see the exact url.
is that possable?
Cheers.
You can work out the URL. It'sCode:'http://' . $_SERVER['HOST'] . '/' . $_SERVER['REQUEST_URI']
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks