Smf
From ThaiiS Note (Wiki)
index.php เก็บที่ /
// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
db_fatal_error();
@mysql_query("SET NAMES utf8",$db_connection); // เพิ่มบันทัดนี้ลงไป (บันทัดที่ 73)
// Load the settings from the settings table, and perform operations like optimizing.
reloadSettings();
ไฟล์ SSI.php เก็บที่ /
if (empty($db_persist))
$db_connection = @mysql_connect($db_server, $db_user, $db_passwd);
else
$db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd);
if ($db_connection === false)
return false;
@mysql_query("SET NAMES utf8",$db_connection); // เพิ่มบันทัดนี้ลงไป (บันทัดที่ 74)
// Add the database onto the prefix to avoid conflicts with other scripts.
ไฟล์ Errors.php เก็บที่ /Sources
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
$db_connection = false;
if ($db_connection && @mysql_select_db($db_name, $db_connection)){ @mysql_query("SET NAMES utf8",$db_connection); /*เพิ่มบันทัดนี้ลงไป (บันทัดที่ 228)*/}
@mysql_query("SET character_set_results=tis620",$db_connection);
@mysql_query("SET character_set_client=tis620",$db_connection);
@mysql_query("SET character_set_connection=tis620",$db_connection);
