| |
|
|
Andreas Schnitzler | Hello together, stand straight to of/ one integrally ähnlichen task.
my Solution: no Makros u.ä. Schnickschack, separate Word-document (Presentation) as "RTF" abspeichern (Result: pure Textdatei), lowlevel (as string) reading, Placeholder* programmatisch supplant, finished Text lowlevel with ".DOC"-Endung Save, ready.
*) Placeholder should no Umlaute or. Sonderzeichen include, otherwise Better get going komplex. Eingesetzte Umlaute go against it free from problems processing (WW 2007). Textersetzung should discretionary long his can.
s.a.: [...]
AUSZUG (php-source): 2 * Word-document (RTF, but as .DOC kaschiert) set up 5 // Template open 6 $letter = file_get_contents('my_template.doc.php'); 11 $letter = str_replace('*tagesdatum*', strftime("%d.%m.%Y"), $letter); 19 $letter = str_replace('*qanrede1*', $qanrede1, $letter); ... 29 // Save file (with Endung .DOC) 30 $file_name = 'my_template.doc'; 31 $fp = fopen('tmp/' . $file_name, 'w'); 36 fputs($fp, $letter); 37 fclose($fp);
but THANK YOU the Community for many suggestions! |
|
|
| |
|
|
|
| Hi!
hint: there You file_get_contents uses... You can also file_put_contents benefit!
having 2003 something like time but with Openoffice-SXW-Files made, with SXW are The Placeholder in Klartext.
PS: The Link in Your Posting lead imho on a Leerseite. |
|
|
| |
|
|