仍然得到:更改后'populating $HTTP_RAW_POST_DATA is deprecated'



每当我提交表单以执行 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 之前的空格。尽管如此,我仍然收到错误消息。

还能是什么?

脚本.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";
}

我重新启动了计算机,它可以工作

最新更新