$_POST失效,返回空数组
提交出代码:
<?php
require_once ("../config.php");
//把传递过来的信息入库
/* print_r($_POST);*/
/*echo $name;*/
echo file_get_contents("php://input");
$a=$_POST['bookName'];
echo $a;
html代码
<form role="form" id="form1" name="form1" method="POST" action="book.add.handle.php">
<div class="form-group">
<label for="id">id:</label><input type="text" class="coomm-id" name="id"/>
</div>
<div class="form-group">
<label for="bookName">书名:</label><input type="text" class="coomm-id" name="bookName"/>
</div>
<div class="form-group">
<label for="bookType">书本类型:</label><input type="text" class="coomm-id" name="bookType"/>
</div>
<div class="form-group">
<label for="bookAuthor">作者:</label><input type="text" class="coomm-id" name="bookAuthor"/>
</div>
<div class="form-group">
<label for="price">价钱:</label><input type="text" class="coomm-id" name="price"/>
</div>
<div class="form-group">
<label for="total">总数:</label><input type="text" class="coomm-id" name="total"/>
</div>
<div class="btn-wrap">
<input type="submit" class="btn btn-primary" value="提交"></input>
<button class="btn btn-info" type="button">重置</button>
</div>
</form>
这是为什么呢?