Forums

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

#176696
__
Participant

Obviously its not loading it right.

Why is this obvious? Please note, I mean no offense here: you haven’t described what you tried to do in any detail, nor have you provided any links to code or documentation that might help point the way at how it should be done. Without detailed explanations, all we can do is offer wild guesses.

Wild guess: you’re creating a class instance and assigning it to $PHPWord, then you’re creating (what I assume is) a document and assigning it to $document. You’re setting a value on $document, but it would appear that you’re trying to save $PHPWord.

edit:

Is this the library you’re using? If so, it would seem that my wild guess above is probably not the cause of your problem. Have you asked your question on PhpWord’s discussion boards?

Another suggestion would be to make sure you have error reporting enabled.