PHPOffice下PHPWord生成Word2007(docx)使用方法


要正常使用,下載依賴包:

PhpOffice/Common:https://github.com/PHPOffice/Common

Zend/Escaper:https://github.com/zendframework/zend-escaper

Zend/Stdlib:https://github.com/zendframework/zend-stdlib

Zend/Validator:https://github.com/zendframework/zend-validator

引用方法:

1 spl_autoload_register(function ($class) {
2     $class = ltrim($class, '\\');
3     $class = str_replace('\\', '/', $class);
4     $file = CORE .'/' . $class . '.php';
5     if (file_exists($file)) {
6         require_once $file;
7     }
8 });
9 include CORE .'/PhpOffice/PhpWord/PhpWord.php';

使用方法:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM