Researched the problem of custom header information in PHP all night. I have read a lot of code, but I have limited knowledge and skills. Even the test demo didn't work. I'm really ashamed. Here I see a method of obtaining header information. It’s pretty good. Let’s record it.
We can get the header data in $_SERVER. Custom data uses HTTP_ as the prefix, so the data with the HTTP_ prefix can be read out.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Reference link: http://blog.csdn.net/fdipzone/article/details/49518535
Thank you everyone for reading, I hope you will benefit a lot.
This article is reproduced from: https://blog.csdn.net/LJFPHP/article/details/78897951
Recommended tutorial: "php tutorial"
The above is the detailed content of Learn how to obtain header information in PHP in two minutes. For more information, please follow other related articles on the PHP Chinese website!