I want to write a function that will return different results depending on which page it was called from.
I would like to have it detect it's context instead of passing it.
intead of:
function foo($curURL)
{
echo "$curURL";
}
then going
foo("$PHP_SELF");
I want to go:
function foo()
{
echo "$PHP_SELF";
}
so I can just
foo();
but when I do this I get an empty string not the current URL from whence the function was called.
For some reason I feel, as it's predefined I should be able to use it as a global.
Bad thinking?
I've PHP Version 4.0.4pl1 on a stock RH7.1 system.
Thanks everyone.