This project is read-only.

Template save problem

Nov 14, 2012 at 4:13 PM

If i try to create a  new file from template the text from file is "PKKnAword/document.xmlPKKnAword/document.xmlPK?1"


$this->loadModel('EmptyContract');

 $contract=$this->EmptyContract->findByid($id_contract);

$patch=COMPANY_CONTRACTS.$contract['EmptyContract']['patch'];
require_once('contracts/PHPWord.php');
$PHPWord = new PHPWord();
$template = $PHPWord->loadTemplate($patch);
$template -> setValue('DATE', date(DATETIME));
$template->save(COMPANY_CONTRACTS.'Test.docx');