Click here to
get yummy grain feed
delivered to your RSS oven

rss

  • Businesswing Design BLOG
  • Assist to join the global market.
3-4 網頁為何看不到或變成亂碼?

Date:十二月 8, 2009 | Author:eggggg

瀏覽器如何知道網頁的編碼呢?網頁<head></head>內可加入<meta http-equiv=”Content-Type” content=”text/html; charset=編碼”>以確認瀏覽器會以正確的編碼顯示,如果網頁內沒有這一行文字,會造成什麼結果呢?以IE8來說,就會無法顯示正確內容,而Firefox可以。

但如果網頁本身為Big5編碼,而用UTF-8的meta標示呢?

(檔案名稱:「3」資料夾內「charset1.php」)

01 <html><head>
02 <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
03 <title>Big5編碼,但用utf8的meta標示</title>
04 </head><body>
05 <?
06 echo “中文測試”;
07 ?></body></html>

+Read more

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

         top