I need save document in docx format. For that, i use PHPOffice/PHPWord
I add it in my composer
"phpoffice/phpword": "dev-master"
Than update composer. Than i use like example in instruction from 'Get start' section https://github.com/PHPOffice/PHPWord .
I didn't register it in AppKernel, because if i add new PhpOffice\\PhpWord\\PhpWord()
i have error Method getname is not defined.
.
My question is how customize it for work and where document save?
You have to select PHPOffice from your root namespace. So add a Slash before your namespace. Something like this:
new \\PhpOffice\\PhpWord\\PhpWord()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.