Here is my code:
if (isset($_POST["firstname"]))
{
$name = $_POST["firstname"];
$filename = '_output/' . $name;
require_once './classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addTemplate('_wordDocs/template.doc');
$docx->addTemplateVariable('NAME', $name);
$docx->createDocx($filename);
echo '<a href="' . $filename . '">Your new file</a>';
}
And the Error:
Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53
Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53
Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53
Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53
Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 57
Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 57
Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 57
Warning: DOMDocument::loadXML(): Empty string supplied as input in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53
Fatal error: Call to a member function appendChild() on a non-object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53