RE: [PHP-DB] RTF to HTML
| From: | Peter Lovatt | Date: | Thu, 15 May 2003 12:52:09 +0000 |
| Subject: | RE: [PHP-DB] RTF to HTML | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27771@lists.php.net to get a copy of this message | ||
Hi
<?php
$retval = '<html> html code here .................';
header ("Content-type: application/msword");
header ("Content-Disposition: attachment; filename=report.doc");
print ($retval) ;
?>
will open the html in MS Word (which auto detects the HTML) - not sure about
other word processors
You can then save as rtf, if that suits.
rtf is a very simple format You could also create a template rtf file using
a WP, open it in a text editor and embed php in it. You can then use
<?php
header ("Content-type: application/msword");
header ("Content-Disposition: attachment; filename=report.rtf");
include (doc.rtf)
?>
HTH
Peter
-----Original Message-----
From: Angelo Zanetti [mailto:binc2@ctech.ac.za]
Sent: 15 May 2003 13:15
To: php-db@lists.php.net
Subject: Re: [PHP-DB] RTF to HTML
the problem is that I select all these records from a DB and populate a
table in an HTML page. So I cant exactly do the MS word thing... any other
suggestions??
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php