How do I set the Content Type header

Version 1
    This document was generated from CDN thread

    Created by: David Nguyen on 11-06-2008 06:56:43 PM
    I am using the Apache Webserver to host XML applications for the IP-Phones. How do I set the Content Type header on the pages that are served?

    Subject: Re: How do I set the Content Type header
    Replied by: David Nguyen on 11-06-2008 06:57:14 PM
    If you wish to serve static XML files with the .xml extension, text/xml should already be in mime.types file. Otherwise, you can add the following to httpd.conf:

    AddType text/xml .xml

    see: http://httpd.apache.org/docs/mod/mod_mime.html

    If you are going to implement dynamic pages using PHP, then it's up to the PHP script to output the content type:

    header("Content-type: text/xml");

    see: http://www.php.net/manual/en/function.header.php