php7下phpword中报错 String because 'String' is a special class name

在php7中String作为关键字不能用作类名,所以在引用phpword时就会报错,将PhpOffice\PHPWord\Shared文件夹下的String.php改为StringElement.php,然后再将全局引用的地方和命名空间修改为StringElement.就可以了

猜你喜欢

转载自blog.csdn.net/man8023man/article/details/68945267