The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Loading A .docx with PHPWord Reply To: Loading A .docx with PHPWord


To me it was obvious that it was not loading the template file because, following phpWords examples, if I add sections and text to the file, that section/text shows up in the output file. But nothing from the loaded template file shows up in the output file.

Ah — the way I read your OP, the output file was “a blank word document, 7kb in size”, regardless.

Briefly looking over the source code, it would seem that the authors use exceptions for error handling. (Are you using trycatch blocks?) Make sure you have enabled error reporting on your server and see if any error messages show up — if loading the template is failing, there are three or four points where you should get an exception thrown.