+ 1
Hola amigos que codigo me recomiendan para modificar un doc en word a partir de una plantilla con info. de una base de datos.
5 Antworten
+ 1
oh I found out how to generate .docx
there are many methods one simple one is by header php has ability to write doc
<?php
// codes to connect and pass queries to database and get data.
header('Content-type:application/Vnd.ms-word');
header('Content-Disposition: attachment:Filename=file.docx'),;
echo "<html>";
echo "<head>";
echo '<meta http-equivalent=\"Content-Type\" content=\"text/html; charset=Windows-1252\">';
echo "</head>";
echo "<body>first name:";
echo $namefromdatabase;
ech "</body>";
echo "</html>"
?>
+ 7
Great u know his language
+ 3
Hola amigo 😀
you can make a program that writes file by fwrite() function of php there you can use variables like
$file="the file is".$namefromdatabase."is the first name"
you can use information from database but it will be in .txt in a simple method .docx is difficult
+ 1
Nice its cool Keshvi.
0
thanks, so i need a library?