$_POST失效,返回空數(shù)組
提交出代碼:
<?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">總數(shù):</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>
這是為什么呢?
2017-08-04
我也。。。
2017-04-27
我也是這種情況
不知道為什么是空的
2017-03-25
失效?你在書名那個text中輸入了么