April 2nd, 2001, 10:15 AM
I'm currently writing an ecommerce site and the bank we're using wants the credit card transactions sent in an XML file (Boo!)
So far I've tried to write a little test file that's a mix of xml and php (all the data is in php variables) but it doesn't flippin' work :-(
If I call the file myFile.xml, all the xml comes out ok but the php is typed out exactly as I typed it in. If it's myFile.php I get a parse error on line 1 where it's still just xml.
Can anyone tell me how to do this? It's driving me mad.
April 4th, 2001, 01:52 PM
It is because your Web Server isn't parsing a .xml file for PHP code and when it parses your .php file it is trying to read your XML as php, what you need to do is use echo to make the XML, as you would if you were making HTML.