> Well, as far as I'm aware $_SERVER isn't reliable from server to server.
> That said, I've never had a problem using it.

Thanks -- I just looked it up and the manual says: "There is no
guarantee that every web server will provide any of these; servers may
omit some, or provide others not listed here. That said, a large
number of these variables are accounted for in the ยป CGI 1.1
specification, so you should be able to expect those."

So I guess it wouldn't make sense to rely on anything in $_SERVER if
you're building an app for widespread use; e.g., CodeIgniter, as
mentioned above.

> tend to use the $_REQUEST array instead of $_POST or $_GET. You get the
> benefit of being able to work with both arrays (as well as $_SESSION and
> $_COOKIE) without any drawbacks.

For now I'm inclined against $_REQUEST, since it's not yet supported
by filter_input(). I think filter_input() is the bee's knees and I've
stopped touching $_POST or $_GET directly since I discovered it.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to