PHPWord 0.11.0字体样式下划线
我认为PHPWord版本0.11.0有问题,我使用PHPWord进行CI 问题是我找不到正确的php脚本来制作下划线,这是我得到的最新脚本PHPWord 0.11.0字体样式下划线,php,codeigniter,codeigniter-3,phpword,phpoffice,Php,Codeigniter,Codeigniter 3,Phpword,Phpoffice,我认为PHPWord版本0.11.0有问题,我使用PHPWord进行CI 问题是我找不到正确的php脚本来制作下划线,这是我得到的最新脚本 $section->addText( $text, [ 'underline' => \PhpOffice\PhpWord\Style\AbstractStyle::UNDERLINE_SINGLE ], // Problem with this line [ 'align' => \PhpOffice\PhpWo
$section->addText(
$text,
[ 'underline' => \PhpOffice\PhpWord\Style\AbstractStyle::UNDERLINE_SINGLE ], // Problem with this line
[ 'align' => \PhpOffice\PhpWord\Style\Alignment::ALIGN_CENTER ] // This one fine
);
但是每当我得到脚本时,它总是显示一个错误,或者没有给我想要的,带下划线的文本
这就是我犯的错误
遇到未捕获的异常
类型:错误
消息:未定义的类常量“UNDERLINE\u SINGLE”
文件名:
C:\xampp\htdocs\test\application\controllers\Print.php
电话号码:47
回溯:
文件:C:\xampp\htdocs\test\index.php行:315函数:
需要一次
非常感谢您的帮助,提前谢谢。要实现一个下划线,请添加一个元素:
数组“underline”=>“single”在样式数组中要实现单个下划线,请添加元素: 数组'underline'=>样式数组中的'single'