Question Locked

How To Echo Own Page Url On Page ?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Php Folks,

My question is My url is this:
https://localhost/Templates/Pagination_Template.php?search=keyword&tbl=links&col=keyword&max=1&page=36

Q1.
If I want to echo on page the url in this following format then how do I do it ?
https://localhost/Templates/Pagination_Template.php?search=keyword&tbl=links&col=keyword&max=1&page=1

Q2.
If I want to echo on page the url in this following format then how do I do it ?
https://localhost/Templates/Pagination_Template.php

I ask because, when I use this:

echo $_SERVER['PHP_SELF'];
I get echoed this:
/Pagination_Template.php

And, when I use this:

echo $_SERVER['PHP_SELF'];
I get echoed this:
Pagination_Template.php

Q3.
This is relative url:
Pagination_Template.php

But what kind of url is this as it is neither rel or absolute url ?
/Pagination_Template.php

I need all three questions addressed.

Thanks

3 replies

This discussion is closed to new replies.