0
每當我提出我的形式來執行PHP腳本,我得到的錯誤信息後:
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and
will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
Warning: Cannot modify header information - headers already sent in Unknown on line 0
我有沒有註釋,並確保它是-1 。我也切換到PHP 7和重新啓動我的WAMP的服務器。 php的元素之後我也查空白之前EN。不過,我仍然收到錯誤消息。
還能是什麼可能呢?
的script.php
<?php
parse_str(file_get_contents("php://input"), $_POST);
$link = mysqli_connect("127.0.0.1", "root", "", "izandb");
if(isset($_POST['submit'])) {
$klas = $_POST['klasDown'];
$naam = $_POST['naamTxt'];
$percentages = $_POST['percentages'];
$antwoorden = $_POST['antwoorden'];
$stmt = $link->prepare('
INSERT INTO resultaten (Klas, Naam, Percentages, Antwoorden)
VALUES (?, ?, ?, ?)
');
$stmt->bind_param('ssss', $klas, $naam, $percentages, $antwoorden);
$stmt->execute();
echo "Insertion succeed";
}
'已取消,將在未來的version' =被刪除>即可移動到最新版的PHP 7.噢,那傷害 –
@AlivetoDie在某些時候你會嘗試只是一切:p – user3660293
https://stackoverflow.com/a/40180889/4248328 –