Num6 Num6 - 7 months ago 116
PHP Question


I recently was seeking a way to properly determine protocol, under which url request was supplied to the server.

I watched through

and though
superglobal variable, and found this:

header('Content-Type: text/plain');




However, I was unable to find it on or Google. Though, I was able to find this question. Q#1: If
wasn't documented, then it is probably unreliable, or it can be trusted?

I'am using
VC9 PHP 5.4.14 TS
under windows for development. But my production is under ubuntu. Q#2: Is this property also availible under ubuntu linux too?


It is hard to prove that it is reliable, but it is easy to prove that it is not reliable (if only I could provide a case which it does not work). And I can prove that it is unreliable because it does not work with IIS 7.0 + PHP 5.3