Home > Backend Development > PHP Problem > What should I do if php cannot receive the parameters of the applet?

What should I do if php cannot receive the parameters of the applet?

藏色散人
Release: 2023-03-14 11:38:02
Original
2508 people have browsed it

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 .

What should I do if php cannot receive the parameters of the applet?

#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']);
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template