Answer the question
In order to leave comments, you need to log in
How to add value to document template using PhpWord loadTemplate and setValue?
Using this code gives an error
$PHPWord = new PHPWord();
$doc = $PHPWord->loadTemplate($template);
$section = $PHPWord->createSection();
$section->addText('bla bla bla');
$doc->setValue('object', $section);
$doc->save($tempFile);
[ErrorException] E_RECOVERABLE_ERROR
Object of class PHPWord_Section could not be converted to string (0)
/www/local/libs/classes/PHPWord/Template.php:105
#0: str_replace(string, string, string)
/www/local/libs/classes/PHPWord/Template.php:105
#1: PHPWord_Template->setValue(string, object)
/www/local/page/kp/index.php:189
Answer the question
In order to leave comments, you need to log in
You need to transfer your domain to your DNS server in the digitalocean control panel. or another third-party DNS server and enter a record of type A or AAAA (where A is Ipv4, and AAAA Ipv6) the public address where your site or other resource hangs.
Alternatively, you can do it through CloudFlare.
Example article: https://hostiq.ua/wiki/dns-hosting-cloudflare/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question