【实例简介】
前段时间用到得导出学生信息到word,利用phpword将内容生成word,更新wordn内容到项目中下载。按照路径将phpword放到指定得目录vendor下引用就可以了。
【实例截图】
【核心代码】
phpword
└── phpword
├── PHPWord
│ ├── Examples
│ │ ├── 1435564491.docx
│ │ ├── 1435564572.docx
│ │ ├── AdvancedTable.php
│ │ ├── BasicTable.php
│ │ ├── _earth.JPG
│ │ ├── HeaderFooter.php
│ │ ├── Image.docx
│ │ ├── Image.php
│ │ ├── Link.php
│ │ ├── ListItem.php
│ │ ├── _mars.jpg
│ │ ├── Object.php
│ │ ├── Section.php
│ │ ├── _sheet.xls
│ │ ├── Template.docx
│ │ ├── Template.php
│ │ ├── Text.docx
│ │ ├── Text.php
│ │ ├── Textrun.php
│ │ ├── TitleTOC.php
│ │ └── Watermark.php
│ ├── PHPWord
│ │ ├── Autoloader.php
│ │ ├── DocumentProperties.php
│ │ ├── IOFactory.php
│ │ ├── Media.php
│ │ ├── Section
│ │ │ ├── Footer
│ │ │ │ └── PreserveText.php
│ │ │ ├── Footer.php
│ │ │ ├── Header.php
│ │ │ ├── Image.php
│ │ │ ├── Link.php
│ │ │ ├── ListItem.php
│ │ │ ├── MemoryImage.php
│ │ │ ├── Object.php
│ │ │ ├── PageBreak.php
│ │ │ ├── Settings.php
│ │ │ ├── Table
│ │ │ │ └── Cell.php
│ │ │ ├── Table.php
│ │ │ ├── TextBreak.php
│ │ │ ├── Text.php
│ │ │ ├── TextRun.php
│ │ │ └── Title.php
│ │ ├── Section.php
│ │ ├── Shared
│ │ │ ├── Drawing.php
│ │ │ ├── File.php
│ │ │ ├── Font.php
│ │ │ ├── String.php
│ │ │ ├── XMLWriter.php
│ │ │ └── ZipStreamWrapper.php
│ │ ├── _staticDocParts
│ │ │ ├── _doc.png
│ │ │ ├── fontTable.xml
│ │ │ ├── numbering.xml
│ │ │ ├── _ppt.png
│ │ │ ├── settings.xml
│ │ │ ├── theme1.xml
│ │ │ ├── webSettings.xml
│ │ │ └── _xls.png
│ │ ├── Style
│ │ │ ├── Cell.php
│ │ │ ├── Font.php
│ │ │ ├── Image.php
│ │ │ ├── ListItem.php
│ │ │ ├── Paragraph.php
│ │ │ ├── TableFull.php
│ │ │ ├── Table.php
│ │ │ └── TOC.php
│ │ ├── Style.php
│ │ ├── Template.php
│ │ ├── TOC.php
│ │ └── Writer
│ │ ├── IWriter.php
│ │ ├── Word2007
│ │ │ ├── Base.php
│ │ │ ├── ContentTypes.php
│ │ │ ├── DocProps.php
│ │ │ ├── Document.php
│ │ │ ├── DocumentRels.php
│ │ │ ├── Footer.php
│ │ │ ├── Header.php
│ │ │ ├── Rels.php
│ │ │ ├── Styles.php
│ │ │ └── WriterPart.php
│ │ └── Word2007.php
│ └── PHPWord.php
└── phpword.php
12 directories, 81 files