I have a PHP script that outputs valid XML to the browser. Is there a way that I can get Chrome to display this as XML?
Asked
Active
Viewed 217 times
1 Answers
3
Try changing the content type in the HTTP header to state that the output is XML formatted. Put this in the top of your PHP script:
header('Content-type: text/xml');

MrKiane
- 4,803
- 2
- 17
- 27
-
Yup! The browser looks for this info first. File extension isn't actually supposed to be meaningful here. – Andrew Barber Jan 27 '12 at 13:26