Does anyone know how to use PHP to check from where pages are being served? I have a couple constants in a config file that point to file paths. The paths are different between my development environment and server.
If I could check where the pages are being served, I could use an IF statement to set the constant paths accordingly. Right now (and I'm embarrassed to say), I set them manually as I move files from one environment to the next.
BTW, I primarily use these constants as a prefix in header commands; i.e.,
header("Location: " . GL_ROOT . "status.php") ;
Thanks.