denoteone Posted November 23, 2010 Share Posted November 23, 2010 My variable which should be storing XML data and echos it to the screen is echoing the data as a string without the XML structure Below is my code but it is still not working: $view = $_GET['view']; $xml_data = "http://www.website.com/STRATA/" . $view .".xml"; $handle = fopen($xml_data, 'r'); $Data = fread($handle, 10000); fclose($handle); echo $Data; Link to comment https://forums.phpfreaks.com/topic/219530-read-and-echo-xml-not-working/ Share on other sites More sharing options...
denoteone Posted November 23, 2010 Author Share Posted November 23, 2010 ok I wasnt setting the header header('Content-type: text/xml'); Link to comment https://forums.phpfreaks.com/topic/219530-read-and-echo-xml-not-working/#findComment-1138238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.