Forum


Replies: 1   Views: 3790
Undefined variable: phpdocxconfig
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 bloofi  · 23-03-2015 - 13:48

Hi, I installed the trial version of phpdocx in a folder named "phpdocx". The check.php says OK for everything. When i try the example "replaceVariableByText", it works fine, i got the generated log and docx file. However, when i try to do it from a script of mine (located at the same level as phpdocx folder), i got this error : Undefined variable: phpdocxconfig : phpdocx/classes/CreateDocx.inc, line 3277 Here is my test code : require_once 'phpdocx/classes/CreateDocx.inc' ; function doTheReplace($templateFile, $toFile, $data) { $docx = new CreateDocxFromTemplate($templateFile); $docx->replaceVariableByText($data, array('parseLineBreaks' =>true) ); $docx->createDocx($toFile); } If i check line 3277 in CreateDocx.inc, this is what i see : $this->addProperties(array('creator' => trim($phpdocxconfig['license']['email']), 'description' => str_rot13('Trarengrq ol CUCQbpK gevny irefvba'))); I didn't touch anything in the phpdocxconfig.ini file. How can i solve this issue ? Thanks :)