V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
eric_zyh
V2EX  ›  PHP

求助:POST提交,当Content-Type: text/plain时,无法通过$_POST获取数据

  •  
  •   eric_zyh · 2013-02-19 12:10:01 +08:00 · 4014 次点击
    这是一个创建于 4088 天前的主题,其中的信息可能已经有所发展或是发生改变。
    应该通过什么方式获取?
    2 条回复    1970-01-01 08:00:00 +08:00
    siw
        1
    siw  
       2013-02-19 12:35:51 +08:00
    var_dump($GLOBALS);
    var_dump($_POST);
    cute
        2
    cute  
       2013-02-22 12:19:41 +08:00   ❤️ 1
    $data = isset($HTTP_RAW_POST_DATA) ?
    $HTTP_RAW_POST_DATA :
    file_get_contents('php://input');
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2618 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 14:28 · PVG 22:28 · LAX 07:28 · JFK 10:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.