Replies: 4   Views: 3444
Can't set file name of the downloaded docx (always "document.docx")
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 melino  · 08-02-2014 - 15:44

No matter what I set in


the file name of the downloaded docx is always "document.docx".



works fine, file name on the server in /tmp/ is "test123.docx".

Any idea?

Posted by jorgelj  · 10-02-2014 - 09:30


There's a third parameter to set the filename:

$docx->createDocxAndDownload('test123', null, 'test123');


Posted by melino  · 10-02-2014 - 15:47

Thanx a lot, it worx.

But where is the reference to this? I couln't find it in the manual.

Posted by jorgelj  · 11-02-2014 - 09:28


I recommend you to check the phpdoc included within the library.