PHP using $_request details note
In a report program, $_request is used to receive data to query a condition, $_request[' from ', and if not passed (the default), it gets the first from the existing data. After doing it, run the test locally, pass it to the server, and test it through.
In the acceptance of the time, out of the bug, and this bug is very strange, the same program, put on the same server, the same site, the same URL, just different computers, in My Computer open by default there is data, on some machines open by default is no data.
In order to exclude is the client browser difference, I in the program the data array Print_r prints out, the result is still the same, I can print out a bunch of data here, but there is no data before the machine, output an empty array.
Many friends should have also encountered such a demand: when passing a parameter, if the form post, use the value of $_post, if not, get the value in $_get. Many people will think of $_request, because when $_get and $_post have the same name parameter, $_request is $_post, satisfies the $_ Post-priority requirements (this one is actually configured in php.ini, and the default post is preferred than get).
However, the convenience of things always bring hidden dangers. Many people in the use of $_request, all $_cookie to forget, think $_request is the $_get and $_post combination of arrays. $_request is what, which priority, in fact, according to the php.ini Variables_order parameter is determined, by default is "Egpcs".
In my case, some of the machines under a certain sub-station have a cookie named from, and the scope is *. main domain, so his on-machine $_request will have content, is $_cookie in from, and take him this from to check the data, of course, no, Oh.
Write code, do not ask for convenience, strict demands on themselves, in order to write a more robust program.