i am trying to use PHP to give data into an xml file , i am trying to do this simple :
<?xml version="1.0" encoding="utf-8" ?>
<Data>
<Entry> <?php echo("Hello world");?> </Entry>
</Data>
but , when i am saving this as a .php file it just shows the “Hello world” message , when i am saving it as a .xml file it takes the php script as string and it shows it as it is ….
Do you have any idea how it could work ?
Save it as a PHP script. The XML is being output, but you’re just not seeing it (probably) because your default
Content-Typeistext/html. You can override it, though, usingheader: