Change encoding of an xml file in php
I have opened a server which is waiting for queries. When i send a query, the server will answer it and safe the results in an xml file. Problem is, that I can't use this xml properly because in the first line of the xml is now written:
xml version="1.0 encoding="utf-8"
if I change this in the editor into:
xml version="1.0 encoding="iso-8859-1
than it works fine. But instead of using editor and my hands, i want php to do it? Thx
Just to close the question: I used str_replace(str,'utf-8','iso-8859-1') in the xml file, which helped me to open the xml file in the right way. Thx to you
链接地址: http://www.djcxy.com/p/29842.html上一篇: 如何不用XML编码值
下一篇: 在PHP中更改xml文件的编码