简体   繁体   English

Slim Framework教程问题-未传递请求参数

[英]Slim framework tutorial issue - no request parameters passed

This is the tutorial I followed. 是我遵循的教程。 I encountered the following error message: 我遇到以下错误消息:

Required field(s) name, email, password is missing or empty 必填字段名称,电子邮件,密码丢失或为空

It looks like I didn't post the correct parameters in my post. 看来我没有在帖子中发布正确的参数。 But it's not the case. 但事实并非如此。 Please refer to my screenshot: 请参考我的截图:

在此处输入图片说明

I debugged the source code and found all the following variables are null: 我调试了源代码,发现以下所有变量均为空:

        $name = $app->request->post('name');
        $email = $app->request->post('email');
        $password = $app->request->post('password');

Can anybody tell me what could be the reason? 有人可以告诉我原因吗? Thanks 谢谢

I faced the same problem. 我遇到了同样的问题。 At first I used "Poster" for Mozilla Firefox. 最初,我为Mozilla Firefox使用了“海报”。 I got error: true . 我得到了error: true After that I used "Advanced REST client" for Chrome. 之后,我将“高级REST客户端”用于Chrome。 I got error: true . 我得到了error: true Finally I used Postman -REST client and the problem was gone. 最终,我使用Postman -REST client ,问题消失了。 I got error: false . 我收到error: false and the successful message. 和成功的消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM