当我们使用这样的查询字符串发出GET请求时:
console.log("in destroy", req.sessionID);
console.log("session destroy", req.session);
req.session.destroy((err) => {
if (err) {
return console.log(err);
}
res.send({
code: 200,
success: 'User logged out successfully'
});
});
PHP将该字符串解析为如下所示的关联
answers[0][answer]=ABC2&answers[0][id]=1&answers[1][answer]=XYZ&answers[1][id]=2&answers[2][answer]=QWE&answers[2][id]=3
如何对存储在变量中的字符串进行手动操作?