網絡上不少跨語言網頁大部分都是以 UTF-8 作為編碼
但利用 UTF-8 編碼編寫 PHP 文件使用到 session 及 header 時便會發生問題
UTF-8 編碼的文件會在文件檔頭加上 3個bytes 的資料,這 3個bytes 稱為 BOM - Byte Order Mark
在標準制式下 UTF-8 的這 3個bytes 分別是:
第一個byte - 0xef
第二個byte - 0xbb
第三個byte - 0xbf
UTF-8 is a popular File Encoding on the internet.
However, when we use UTF-8 with PHP using session and header there are some error occurs.
UTF-8 file has 3 bytes of data at the beginning of file, this 3 bytes called BOM - Byte Order Mark
The standard of UTF-8 file of this 3 bytes is:
1st byte - 0xef
2nd byte - 0xbb
3rd byte - 0xbf
透過錯誤經驗,分享科技與遊戲當中的技術,提醒自己及瀏覽此網誌的人,避免踏進相同的陷阱。
本網誌只提供技術概要及合法軟件連結(如有)。
如閣下因下載、安裝、設定資料等操作,導致任何損失,請自行承擔風險及處理,在下不會負責。
2010-11-27
2010-10-18
利用 PEAR 製作 Excel 檔案 (Use PEAR to create an Excel file)
PEAR 為 PHP Extension and Application Repository 的簡稱
是一種以 PHP 物件導向的設計的程式庫
PEAR is the abbreviation of PHP Extension and Application Repository
是一種以 PHP 物件導向的設計的程式庫
PEAR is the abbreviation of PHP Extension and Application Repository
Labels:
Excel
,
PEAR
,
PHP
,
programming
2010-03-17
於 Ubuntu 手動安裝 PHP (Manuel install the PHP in Ubuntu)
安裝 PHP 前建議先安裝 Apache HTTP Server、MySQL Database 及 libxml2
You need to install Apache HTTP Server, MySQL Database and libxml2 before install PHP
libxml2 可以在 Google 等搜尋器上找到
(2-2.7.7 是 2010-03-17 最新版本)
You can find libxml2 with Google search
(2-2.7.7 is the latest version on 2010-03-17)
You need to install Apache HTTP Server, MySQL Database and libxml2 before install PHP
libxml2 可以在 Google 等搜尋器上找到
(2-2.7.7 是 2010-03-17 最新版本)
You can find libxml2 with Google search
(2-2.7.7 is the latest version on 2010-03-17)
訂閱:
文章
(
Atom
)