菜鸟问题:phpstorm下内置服务器运行post无效

WBOY
Release: 2016-06-20 12:40:31
Original
1423 people have browsed it

目的:两个数相加,用post发送到服务器,但服务器未收到提交内容
一、post.html
nbsp;html>


    
    相加




    A:

    B:

    



二、post_server.php

print_r($_POST);
if ($_POST['a'] && $_POST['b']){
    echo $_POST['a']+$_POST['b'];
}else{
    echo '参数均不能为空!';
};

三、运行结果:
Array ( ) 
Notice: Undefined index: a in E:\xampp\htdocs\tools\post_server.php on line 11
参数均不能为空!

四、其它说明
使用内置服务器http://localhost:63342/htdocs/tools/post.html
但使用apache运行没问题http://localhos/tools/post.html
phpstorm版本10.0.1
php解释器设置:E:\xampp\php\php.exe
内置服务器需要配置?


回复讨论(解决方案)



谁叫你用phpstorm 10的,退回9就行了。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template