tags:

views:

37

answers:

1

In a custom project of mine, a function is fully dependent on $_SERVER['REQUEST_URI'] variable. Does it always return the same value on all server environments? (IIS, Apache, etc.)

Thanks.

+1  A: 

It's supposed to.

I haven't done any empirical testing on it, but from the PHP manual page for $_SERVER:

'REQUEST_URI'
The URI which was given in order to access this page; for instance, '/index.html'.

R. Bemrose
I guess only way to test this is to run a script on those servers which I do not have access to...
matte
I think I have found a case where it is different between environments. See http://stackoverflow.com/questions/2097060/php-apache-requesturi-different-behaviour
Daniel Skinner