Forum


Replies: 2   Views: 3591
How to use addtemplatevariable() replace template variables which are chinese simplid like '变量' into
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 bruce  · 27-02-2014 - 02:59

$docx->addTemplate($store_dir);



 



$docx->addTemplateVariable('变量', '<divVariable</div>', 'html');



it doesn't work ,my apache default encoding is utf8,the editor is the same



who knows, thanks a lot


Posted by jorgelj  · 27-02-2014 - 10:40

Hello,



You need to install that fonts in Word. And you can try installing Tidy in PHP and use embedHTML instead of addTemplateVariable.



Regards.