Answer the question
In order to leave comments, you need to log in
Do I need to check HTTP headers via isset?
For example these:
$_SERVER['REQUEST_URI'] (this is not an HTTP header, but the question is the same)
$_SERVER['HTTP_ACCEPT_LANGUAGE']
isset($_SERVER['REQUEST_URI'])
isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])
etc. e. can it turn out that they will not be transferred and will be NULL?
Answer the question
In order to leave comments, you need to log in
Yes, because, depending on the environment, they may not be.
I advise you to read a good guide on using isset and empty, it, among other things, describes your case:
The Definitive Guide To PHP's isset And empty
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question