문제

I am fairly sure that I have read about:

<?php header("location: ...") ?>

Not working on ALL browsers. Some VERY old ones require the "location" bit to be written with a capital letter L:

<?php header("Location: ...") ?>

But I can't find documentation to back this up. The PHP manual does not mention this (anymore?). Anybody any idea?

Note: I am not looking for the best way to do this. I am looking for documentation on browser behavior.

도움이 되었습니까?

해결책

Per RFC 2616, "Hypertext Transfer Protocol", section 4.2:

Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive.

I have never seen and can't find any sources that list any browsers that do not follow the RFC specification, so I wouldn't worry about the capitalization of the header field text. Having said that, I tend to use Location.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top