For example, there is an http get request: {code ...} PHP automatically puts $ _ REQUEST [& quot; state. code & quot;] is escaped as $ _ REQUEST [& quot; state_code & quot;] an official note is as follows: {code ...} because the backend storage uses MongoDB, we hope to query json embedded data... for example, there is an http get request:
http://ask.segmentfault.com/api?state.code=16
PHP automatically escapes $ _ REQUEST ["state. code"] as $ _ REQUEST ["state_code"]
The official notes are as follows:
Dots and spaces in variable names are converted to underscores. For example becomes $_REQUEST["a_b"].
Because the backend storage uses MongoDB, you want to query the data embedded in json. Therefore, you want to support the "point" query method. How should we solve this problem?
By the way, PHP's Web Framework uses Laravel.
Reply content:
For example, there is an http get request:
http://ask.segmentfault.com/api?state.code=16
PHP automatically escapes $ _ REQUEST ["state. code"] as $ _ REQUEST ["state_code"]
The official notes are as follows:
Dots and spaces in variable names are converted to underscores. For example becomes $_REQUEST["a_b"].
Because the backend storage uses MongoDB, you want to query the data embedded in json. Therefore, you want to support the "point" query method. How should we solve this problem?
By the way, PHP's Web Framework uses Laravel.
http://ask.segmentfault.com/api?rq[state.code]=16/** PHP **/$_GET['rq']['state.code'];
It will not be converted in the array. Although it is troublesome, it is a solution...