PhpWord doesn't replace text

前端 未结 7 1457
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-14 09:10

I have a docx file and I need to replace some text. This is done inside codeigniter framework; here is the code:

$this->load->library(\'word\');       
$te         


        
7条回答
  •  不思量自难忘°
    2021-02-14 09:53

    You can use new Template class with new method setValue()

    
            
                {
            
            
            
            
                test5}
            
        
    

    New method can replace it setValue('test5', 'MyValue');

    Download new class: https://github.com/Arisse/PHPWord_CloneRow

提交回复
热议问题