PHPBuilder - Sending RTF header with PHP

RSS Twitter

Sending RTF header with PHP

by: Kelvin Jones
March 1, 2002

I was looking for a way to print an RTF document to the browser however when I used this header:

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

.. IE just prompet me to download.

So after hunting around a bit I found the answer to the problem.. IE won't display the output in the browser unless you have a .rtf extension. So that means in Apache you must put something like this:

AddType application/x-httpd-php .php4 .php .php3 .phtml .rtf

NB: Don't forget to use the header still.



Comment and Contribute

Your comment has been submitted and is pending approval.

Kelvin Jones



(Maximum characters: 1200). You have characters left.