maxedison
maxedison

Reputation: 17553

Can I display the output of a file with extension *.php as XML in Chrome?

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?

Upvotes: 0

Views: 229

Answers (1)

MrKiane
MrKiane

Reputation: 5013

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');

Upvotes: 3

Related Questions