|
 |
|
ขอวิธีแก้ไขภาษาต่างดาวครับ สำหรับหน้าที่ไม่ได้กำหนด Charset |
|
 |
|
|
 |
 |
|
มันต้องกำหนด meta tag อยู่ดีครับ
|
 |
 |
 |
 |
Date :
2011-05-10 11:15:14 |
By :
mr.v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อ่อ ไม่สามารถกำหนดได้ทั้งหน้าไช่ไหมครับ เพราะผมลองแล้วยังไงก็ต้องคอยกำหนดตามตลอทุกบรรทัด
|
 |
 |
 |
 |
Date :
2011-05-10 12:55:40 |
By :
ALTELMA |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำแค่ครั้งเดียวเองนี้ ทำไมต้องทำทุกบรรทัด
|
 |
 |
 |
 |
Date :
2011-05-10 12:58:30 |
By :
naskw |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ข้อความที่ว่า select มาจาก database หรือเปล่า?
1. ถ้า database เป็น utf8_general_ci ให้ใช้คำสั่งนี้ หลังจาก connect ครับ
Code (PHP)
// เริ่มติดต่อฐานข้อมูล
mysql_connect($hostname, $username, $password) or die ("ติดต่อฐานข้อมูลไม่ได้");
// ส่วนที่ทำให้แสดงข้อมูลภาษาไทย
$sql = 'SET CHARACTER SET tis620';
mysql_query($sql);
$sql ="SET collation_connection = 'tis620_thai_ci' ";
mysql_query($sql);
//สิ้นสุดส่วนที่แสดงภาษาไทย
// เลือกฐานข้อมูล
mysql_select_db($dbname) or die ("เลือกฐานข้อมูลไม่ได้");
|
 |
 |
 |
 |
Date :
2011-05-10 15:30:13 |
By :
prach_kp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ป่าวครับ เป็นข้อความธรรมดาในหน้าเพจเลยครับ ไม่ได้เกี่วข้องกับ ดาต้าเบสเลยครับ รบกวนด้วยนะครับ
|
 |
 |
 |
 |
Date :
2011-05-10 15:37:27 |
By :
ALTELMA |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<!-- เพิ่มภาษาไทย -->
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
<!-- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -->
<!-- สิ้นสุดการเพิ่มภาษาไทย -->
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
</body>
</html>
|
 |
 |
 |
 |
Date :
2011-05-10 15:42:31 |
By :
prach_kp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ แต่ผมหมายถึงสำหรับหน้าที่เป็น แบบ php อย่างเดียวน่ะครับ ก็ให้กำหนดแบบนี้ด้วยไช่ไหมครับ
|
ประวัติการแก้ไข 2011-05-11 08:42:17
 |
 |
 |
 |
Date :
2011-05-11 08:41:10 |
By :
ALTELMA |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ได้ครับ เพราะเราสามารถแทรกภาษา PHP ใน tag ของ HTML ได้ครับ
|
 |
 |
 |
 |
Date :
2011-05-11 09:25:59 |
By :
prach_kp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2011-05-11 11:16:38 |
By :
ALTELMA |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|