Solution to the problem that php cannot receive the parameters of the mini program: 1. Open the corresponding PHP code file; 2. Convert json into an array through "json_decode($menu,true);" for normal data processing .
#The operating environment of this article: Windows 7 system, PHP version 7.4, Dell G3 computer.
What should I do if php cannot receive the parameters of the mini program?
What is the reason why PHP cannot receive the POST parameters of the WeChat applet?
php obtains the information as follows:
$menu = file_get_contents('php://input'); $val = json_decode($menu,true); echo($val['menu']);
After converting json into an array, you can process the data normally!
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What should I do if php cannot receive the parameters of the applet?. For more information, please follow other related articles on the PHP Chinese website!