This is a pretty simple problem, but im getting myselft confused...
i want to get the name of the page that i am on... so for example:
if i am on
i want to be able to extract:
Now i test my pages on IIS but my live server is Apache
now ive tried SCRIPT_FILENAME and SCRIPT_NAME
on IIS SCRIPT_FILENAME gives me undefines variable and SCRIPT_NAME gives me the whole path ie: /php/home/myfile.php
on Apache SCRIPT_FILENAME gives me the whole path and SCRIPT_NAME gives me +- what i want /myfile.php (i just have to get rid of the / ).
i need to do the following:
get SCRIPT_NAME (/page.php)
$page = remove the / (using ereg replace)
make the string: $page."?".QUERY_STRING
This should work on Apache right? or is there a better way of doing it? cause this seems like a lot of work for something which should be quite easy?