聽前輩說...
聽前輩說要在php頁面加
header("Content-type: text/html; charset=utf-8");
這個,我加了還是亂碼噢 ,
就這倆個php頁面, 還有倆個頁面是分頁類來的。。
business_form.php
header("Content-type: text/html; charset=utf-8");
include 'comm.php';
if(isset($_POST['qq'])){
$qq = $_POST['qq'];
$selling_price = $_POST['selling_price'];
$original = $_POST['original'];
$expires = $_POST['expires'];
business_table.php
include 'paging.php';
$con =mysql_connect("localhost","root","123456");
mysql_select_db("business",$con);
$result = mysql_paging_query("SELECT * FROM business_table", 5);
echo "
| QQ |
價格 |
原價 |
到期時間 |
服務 |
";while($row=mysql_fetch_array($result)){echo "
"; echo "
| " . $row['qq'] . " | "; echo "
" . $row['selling_price'] . " | "; echo "
" . $row['original'] . " | "; echo "
" . $row['expires'] . " | "; echo "
" . $row['diamond']." | "; echo "
"; }echo "
";
mysql_paging_bar();//顯示分頁條 下面也來一個
mysql_close($con);
?>
------解決方案--------------------
business_table.php頁面 缺少 SET NAMES 'UTF8' 語句