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]
|