$_SERVER [QUERY_STRING] value problem

2019-10-06 23:32:06 / four thousand eight hundred and ninety-two / Default classification

When debugging code, the environment ap2.4 and php7.3 suddenly found a problem when taking the value of $_SERVER ['QUERY_STRING '],

You can see that the view of the QUERY_STRING value here is uppercase, but the address bar is lowercase

I thought it was amazing. Then I tried other strings and found that the first letter of the view value was capitalized

I added an s above, and the first letter was not capitalized. I was confused and puzzled? Is it a keyword?


Because there was a lot of code just now, I was afraid of being affected, so I reopened the directory myself and printed $_SERVER directly

It's actually lowercase again. I repeatedly checked the directory code and files just now. Through comparison, I finally found that the reason is that there is a View folder in the directory just now. Delete the View folder,

The value of $_SERVER ['QUERY_STRING '] will not be capitalized


Finally, the case was solved. This problem is very unpopular. We should try our best to avoid this problem when taking values, so as to avoid problems when comparing





 Gravatar