Reputation: 23
I am using phpword to create a docx file from a template, but when i save the final document and I try to open the result i get an error telling that i don't have the access right to open the file. How can I controle the access rights with phpword so that everyone can open the file. Thank you.
Upvotes: 1
Views: 555
Reputation: 3256
Hi I just made a similar question and solved it myself. So posting here too in case you still need to know. I went into Template.php and changed the saveAs() function. I swapped line:
rename($tempFilename, $strFilename);
to:
copy($tempFilename, $strFilename);
unlink($tempFileName);
Hope that helps somebody.
Upvotes: 0