【问题标题】:How to access json in php from output stream?如何从输出流访问 php 中的 json?
【发布时间】:2019-03-11 13:36:51
【问题描述】:

在 Android 中,我在输出流中添加了键值对。

如何在 PHP 中访问此密钥?

outputstream.writeBytes(twoHyphens + boundary + lineEnd);           //key
                    outputstream.writeBytes("Content-Disposition: form-data; name=\"iddd\"" + lineEnd);
                    outputstream.writeBytes(lineEnd);
                    outputstream.writeBytes("37");    //value
                    outputstream.writeBytes(lineEnd);

【问题讨论】:

    标签: php android json stream


    【解决方案1】:

    如果我收到您的问题.. 这是一个帖子请求。

    您可以在您的 php 脚本中使用POST 访问它。

    $_POST["your_key"];
    

    【讨论】:

    • 实际上我很困惑它是否是 json,然后在交叉检查后我知道它的 JSON。再次感谢!祝你有美好的一天!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-03-11
    • 1970-01-01
    • 1970-01-01
    • 2019-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多