I can get my PHP 5 code to read text into a file but NOT msword or .rtf
opening the document works fine also
here's the code
$ht = file( '/pathtotemplate/contract1.htm' );
$ht = implode( '', $ht ); // don't know what this is for
// substitute stuff here in the original rtf or doc file (works on html data but not rtf or doc)
$ht = str_replace("[[longdate]]",$ld,$ht);
header("Content-Type: application/msword");
header("Content-Disposition: filename=\"myfile.rtf\"" );
header("Pragma: no-cache");
header("Expires: 0");
print $ht;
exit;
read ms-word rtf/doc into variable - change data - then outp
Moderator: General Moderators
-
alltimefav
- Forum Newbie
- Posts: 3
- Joined: Thu Apr 26, 2007 6:36 pm
-
alltimefav
- Forum Newbie
- Posts: 3
- Joined: Thu Apr 26, 2007 6:36 pm
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
-
alltimefav
- Forum Newbie
- Posts: 3
- Joined: Thu Apr 26, 2007 6:36 pm