我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

file_get_contents(“php:// input”)返回String(0)

Im receiving JSON data using PHP.
I'm using file_get_contents("php://input") but it doesn't work.
It returns String(0);.
This is my code:

echo $content = file_get_contents("php://input");
//Attempt to decode the incoming RAW post data from JSON.
$decodedarray = json_decode($content, true);

I have looked into my php.ini file and allow_url_fopen returns 1.
I don't know what I'm doing wrong.

近期文章

  • pg_send_query_params返回TRUE但失败
  • Word字符串/剪切HTML字符串中的文本
  • PHP表单忽略必填字段
  • Laravel:路由和控制器
  • 如何检查PHP中是否取消选中复选框?
  • 如何通过WP_Query限制获取项目的数量
  • MySQL字段值在SQL查询中的时间
  • 是否可以使用php / jsp从pdf文件中获取元数据
  • 将htaccess配置为symfony项目
  • 使用PHP将本地SQL数据库备份到同一台计算机上
  • 如何解决WooCommerce中的PHP断言失败错误?
  • c++/c 语言试题解答
  • 如何添加月份到这个日期我得到
  • 如何在使用Paypal Rest API直接支付卡时安全地获取客户的信用卡
  • 用php给自己发电子邮件
  • echo <<<输出做什么? [重复]
  • 按键对多维数组求和
  • 在PHP中循环并合并Datetimepicker
  • Joomla邮件列表与推荐插件?
  • 数据库失败

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华