Jump to content

**Solved** Display XML through PHP


spfoonnewb

Recommended Posts

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]<?php

if (!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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.