Front-end post data come here! There are about 30 data, all in JSON format, so that my background PHP can be batched to get, parse out! and save it to the database? Ask for advice, big wet ' s .....
If each write $_post[""; too unreasonable;;;
Reply content:
Front-end post data come here! There are about 30 data, all in JSON format, so that my background PHP can be batched to get, parse out! and save it to the database? Ask for advice, big wet ' s .....
If each write $_post[""; too unreasonable;;;
By foreach ($_POST as $key => $value) {}
looping through all the parameters and doing something, you can combine the parameters and persist them to the database in the appropriate way.
30 data is stored in a JSON packet, and then you receive the time to parse the array with unserialize, that is, Key=>value, and then you loop down into SQL statements.
Does the post data not be verified?
Json_decode ()
You can use File_get_contents ("Php://input") to receive requests, and then perform decode processing