spfoonnewb Posted December 6, 2006 Share Posted December 6, 2006 Hello,Basically I made this really secure script =P...The problem is that it just includes the XML data in the HTML, what I want it to do it show the XML file, as if the php file is the XML... so basically it just shows the XML file the same way it would look if I actually went to the XML file.. No changes. Any way to do that?[code]<?phpif (!empty($QUERY_STRING)) {$QUERY_STRING = $id;$id = ereg_replace("[^0-9]", "", $id);$get = "/directory/".$id.".xml";$xml = $id;}if (file_exists($get)) {include "$get"; }else {echo 'Missing File: ('.$xml.'.xml).';die();}?>[/code] Link to comment https://forums.phpfreaks.com/topic/29594-solved-display-xml-through-php/ Share on other sites More sharing options...
genericnumber1 Posted December 6, 2006 Share Posted December 6, 2006 something like[code=php:0]header("Content-Type: text/xml");echo file_get_contents($get);[/code]would work to just display the file $get Link to comment https://forums.phpfreaks.com/topic/29594-solved-display-xml-through-php/#findComment-135829 Share on other sites More sharing options...
spfoonnewb Posted December 6, 2006 Author Share Posted December 6, 2006 That did it :) Thanks. :o Link to comment https://forums.phpfreaks.com/topic/29594-solved-display-xml-through-php/#findComment-135843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.