Description
Could not copy 'payment.docx' file to 'C:\Windows\Temp\PhpABD2.tmp'.
错误位置
FILE: D:\wamp64\www\sample\ThinkPHP\Library\Vendor\PHPWord\src\PhpWord\TemplateProcessor.php LINE: 83
TRACE
#0 D:\wamp64\www\sample\Application\Home\Controller\PaymentManagementController.class.php(118): PhpOffice\PhpWord\TemplateProcessor->__construct('payment.docx')
#1 [internal function]: Home\Controller\PaymentManagementController->downPaymentLetter()
#2 D:\wamp64\www\sample\ThinkPHP\Library\Think\App.class.php(164): ReflectionMethod->invoke(Object(Home\Controller\PaymentManagementController))
#3 D:\wamp64\www\sample\ThinkPHP\Library\Think\App.class.php(202): Think\App::exec()
#4 D:\wamp64\www\sample\ThinkPHP\Library\Think\Think.class.php(121): Think\App::run()
#5 D:\wamp64\www\sample\ThinkPHP\ThinkPHP.php(97): Think\Think::start()
#6 D:\wamp64\www\sample\index.php(25): require('D:\wamp64\www\s...')
#7 {main}
my code:
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('payment.docx');
$templateProcessor->setValue('company', 'hahha');
$templateProcessor->setValue('money', 'hahha');
$templateProcessor->saveAs(ROOT.'/8888888888888888.docx');
so,I don't konw how to do?thank you