process Axios POST in PHP [duplicate]

泪湿孤枕 提交于 2019-12-04 23:10:27

The user solved it "finding" the object in php://input

$data = json_decode(file_get_contents("php://input"), true);
$task = $data['text'];

As pointed by STEEL, it was an issue at the PHP code, not React or Axios.

Just need:

if(isset($_POST['text'])) { ... }
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!