I'm trying to build a small PHP script. Let's call main.php. I want the program to react based on the url of the caller (I use include function).
e.g. of caller (index.php)
..... <? include('main.php'); ?> ......
now, the index.php can be:
- http://www.Domain.co.../Sub1/index.php, etc.
I guess i'm searching for a function that enables php to get the complete url of itself in an online web server. Or do you have a similar suggestion?