php - 我正在尝试通过邮递员发送数据,但 post 方法什么也没发送
问题描述
$_POST 方法不从邮递员返回数据。
//print_r($POST['Mobile']); (Prints nothing)
if($_SERVER['REQUEST_METHOD']=='POST'){
$response = array();
print_r($_POST['Mobile']);
if ($db->updateCart(
$_POST['CartData'],
$_POST['Mobile']
)) {
$response['error'] = false;
$response['message'] = "positive";
}else{
$response['error'] = true;
$response['message'] = "Negative";
}
echo json_encode($response);
}
我已经尝试在 print_r 中打印“某些东西”并且效果很好。谁能告诉我我在哪里做错了。
下面是我要发送的邮递员图像。
解决方案
推荐阅读
- javascript - 用 JS 检测单独 DOM 元素的重要 css 规则
- c# - C# Regex 只找到一个匹配项
- c# - 使用在 C# .Net Core 中运行时创建的类型
- postgresql - 你能帮我用 postgres 为 django 编写完美的 ORM 查询,满足以下条件吗?
- flutter - 在 ListView 内的行中使用 SpaceEvenly 将不起作用
- javascript - 计算对象属性的总和并将它们存储在数组中
- sql - teradata sql问题:如何通过另一列计算具有先前行顺序的不同列中的时间差?
- google-cloud-platform - 用于集成测试的 Google Cloud Functions CI/CD(Python)?
- c# - 包含特定字段以使用 C# 从 MongoDB 获取数据时出错
- python - Flask、Gunicorn、Mysqlconnctor /GET 每次刷新都会出错