0
core.php中PHP MYSQL編碼的問題(土耳其字符)
$con=mysqli_connect("localhost","root","","mmogezgini");
header('Content-Type: text/html; charset=utf-8');
gamelisti.php
$result = mysqli_query($con,"SELECT * FROM games");
while($row = mysqli_fetch_array($result))
{
?>
HTML CODES
<?php echo $row['game_name']; ?>
HTML CODES
<?php }
mysqli_close($con);
?>
我用土耳其語字符,如 「O,C,G,I」 我看到這些正確數據庫,但是當我從數據庫中選擇他們和PHP的echo顯示它們看起來像問號=(?) 我的數據庫utf8_general_ci編碼
非常感謝你[mysqli_set_charset($ db_connection, 「UTF-8」)]。 ]解決了我的問題 –
我遇到了str_replace不能工作的問題,這解決了我的問題,謝謝! – drooh