Update recipes.rst (#2367)

This commit is contained in:
Ahmad Syamim 2023-01-08 16:39:08 +08:00 committed by GitHub
parent aac3a601e1
commit 08064480ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ Use ``php://output`` as the filename.
.. code-block:: php .. code-block:: php
$phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->createSection(); $section = $phpWord->addSection();
$section->addText('Hello World!'); $section->addText('Hello World!');
$file = 'HelloWorld.docx'; $file = 'HelloWorld.docx';
header("Content-Description: File Transfer"); header("Content-Description: File Transfer");