Forum


Replies: 4   Views: 3487
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

$docx->createDocxAndDownload('test123');

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



while



$docx->createDocx('tmp/test123');

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



Any idea?


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

Hello,



There's a third parameter to set the filename:



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



Regards.


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

Hello,



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



Regards.