0
我有一個php腳本,使用以下代碼來修改一個xml文件,然後將其輸入到mysql數據庫中。磅符號Simplexml_load_string問題
除了所有英鎊符號顯示爲£以外,它的工作狀況非常好。
xml編碼爲utf-8。
$xml = file_get_contents('test.xml');
$params = json_decode(json_encode(simplexml_load_string($xml)), 1);
//DETAILS TO INSERT
$contact_url = $params['contact_url'];
etc
有人知道爲什麼會發生這種情況嗎?
謝謝
感謝您爲此 - 我已經仔細檢查了xml,它絕對是utf-8 – Haribo83 2012-08-02 07:10:28