Forum


Replies: 2   Views: 3445
Using adddocx and addtemplate together
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by touchline  · 30-11-2013 - 19:39

When I try using addDOCX and addTemplate together in the same script only the template page is being added, how can both be used together?



require_once '../../classes/CreateDocx.inc';

$docx = new CreateDocx();

$docx->addTemplate('../docx/page1.docx');

$docx->addTemplateVariable('NAME', $_POST['name']);

$docx->addDOCX(array('pathDOCX' => '../docx/page2.docx'));

$docx->createDocx('../docx/audit');