Heim  >  Fragen und Antworten  >  Hauptteil

PHP fügt seltsame Symbole anstelle polnischer Buchstaben ein

Wenn ich diesen Code verwende, um Daten aus der MySQL-Datenbank einzufügen, werden keine polnischen Buchstaben angezeigt, sondern zufällige seltsame Symbole anstelle polnischer Buchstaben. Außerdem scheint dies ein Problem mit der Datenbankseite zu sein, aber ich habe es auf utf8_polish_ci: PHP zeigt Symbole anstelle von Buchstaben an

    $con=mysqli_connect("localhost","blank","blank","blank");
    if (mysqli_connect_errno())
    {
        echo "Nie Udało się połączyć z bazą danych: " . mysqli_connect_error();
    }

    $result = mysqli_query($con,"SELECT * FROM Delegacje");

    echo "<table>
<tr>
<th>Imię i Nazwisko</th>
<th>Data od</th>
<th>Data do</th>
<th>Miejsce wyjazdu</th>
<th>Miejsce przyjazdu</th>
</tr>";

    while($row = mysqli_fetch_array($result))
    {
        echo "<tr>";
        echo "<td>" . $row['Imie i Nazwisko'] . "</td>";
        echo "<td>" . $row['Data od'] . "</td>";
        echo "<td>" . $row['Data do'] . "</td>";
        echo "<td>" . $row['Miejsce wyjazdu'] . "</td>";
        echo "<td>" . $row['Miejsce przyjazdu'] . "</td>";
        echo "</tr>";
    }
    echo "</table>";

    mysqli_close($con);




P粉189606269P粉189606269235 Tage vor376

Antworte allen(1)Ich werde antworten

  • P粉441076405

    P粉4410764052024-02-27 16:02:53

    尝试在常规记事本中打开文件并另存为,并在编码下选择 UTF-8,这也会有帮助。

    Antwort
    0
  • StornierenAntwort