Read php file with content-type xml -


i have php file set header header ("content-type: text/xml");. when try read file simplexml_load_file() returns `false. if set extension xml, file read correctly.

i use php 5.1.6. version > 5.3 works fine. bug in version 5.1.6. problem?

thanks

try file , load string:

$str = file_get_contents($file); $xml = simplexml_load_string($str); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -