You are here: outputting XML from PHP « PHP Programming Language « IT news, forums, messages
outputting XML from PHP

Posted by runner7 on 08/03/06 23:25

This is a question about outputting pure XML from PHP, such as to a
request object in an AJAX application. I would suppose that all I have
to do in my script is to add the line before any other output:

header('Content-Type: text/xml');

Then I should be able to use the ordinary output mechanisms of literals
outside of php tags, and "echo" and "print" inside php tags.

This post is not about the caching issues which I am aware of. Can
anyone tell me if all this is correct and if the following assumptions
are correct?

1. This header will replace the "Content-Type" header sent by the web
server.

2. I do not need to specify a character set in the header, or do I?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация