alshabalin/docx-template
Composer 安装命令:
composer require alshabalin/docx-template
包简介
Docx Template
关键字:
README 文档
README
Allows convert any docx document to template, using variable, like {this}.
Install the package
composer require alshabalin/docx-template
How to use
<?php require 'vendor/autoload.php'; use Alshabalin\DocxTemplate\DocxTemplate as DocxTemplate; $data = [ 'key' => 'value', 'name' => 'John', 'lastname' => 'Doe', 'city' => 'London', ]; $template = new DocxTemplate(); $template->open('document.docx') ->setData($data) ->save('result.docx');
You may want to remove any missing variables from your template by passing true as the second param to setData method:
$template->setData($data, true);
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-05