PhpStorm $ _POST始终为空 [英] PhpStorm $_POST always empty

查看:152
本文介绍了PhpStorm $ _POST始终为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$_POST似乎不起作用.我已经安装了PhpStorm 10.0.3,并使用WAMP服务器默认的php解释器.

$_POST seems that does not work. I've installed PhpStorm 10.0.3, and using the WAMP server default php interpreter.

在index.php中:

in the index.php:

<form method='post' action='a.php'>
    <input type='text' name='user_f'>
    <input type='submit' name='send' value='Send'>
</form>

在a.php中:

var_dump($GLOBALS);

当我以以下形式键入"asdf"时:

when I type "asdf" in the form:

array (size=9)
      'HTTP_RAW_POST_DATA' => string 'user_f=asdf&send=Send' (length=22)
      '_GET' => 
        array (size=0)
          empty
      '_POST' => 
        array (size=0)
          empty
      '_COOKIE' => 
        array (size=0)
          empty
      '_FILES' => 
        array (size=0)
          empty
      '_ENV' => 
        array (size=0)
          empty
      '_REQUEST' => 
        array (size=0)

$_GET效果很好,但似乎解释器没有填充$_POST变量.

$_GET works good, but seems like the interpreter don´t fill the $_POST variable.

php.version:5.4.12(使用来自 http://php的5.6.18和7解释器的相同问题. net/downloads.php )

php.version: 5.4.12 (same problem using 5.6.18 and 7 interpreters from http://php.net/downloads.php )

此版本的php.ini文件:(wamp中的默认设置)

php.ini file for this version:(default from wamp)

在PhpStorm中,其他类似MySQL的端口(3306)可以很好地工作. (与phpmyadmin的连接可以)

Other ports like (3306) for MySQL works good in the PhpStorm. (Connection with phpmyadmin is ok)

Xdebug端口:9000 PhpStorm内置服务器端口:63342

Xdebug port : 9000 PhpStorm built-in server port: 63342

如果我在默认的localhost:8000上从Netbeans IDE进行构建,那么一切都会很好

Everything works good if i build from Netbeans IDE in the default localhost:8000

笔记本电脑出现相同的问题.

Same problem in my laptop.

推荐答案

新的PhpStorm 2017.2.2 EAP版本(172.3968.23)解决了此问题.

The new PhpStorm 2017.2.2 EAP build (172.3968.23) has solved this problem.

错误 WEB-17317 502发布数据时来自服务器的错误网关错误.

Bug WEB-17317 502 Bad Gateway error from the server when post data.

您可以在此处下载.

完整的发行说明 link => confluence.jetbrains.com/display/PhpStorm/PhpStorm+EAP+172.3968.23+Release+Notes

Complete Release notes link=>confluence.jetbrains.com/display/PhpStorm/PhpStorm+EAP+172.3968.23+Release+Notes

这篇关于PhpStorm $ _POST始终为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆