Forum


Replies: 6   Views: 2892
Add progress bar
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by irishadar  · 19-02-2018 - 20:22

hi,

I have looked at my script but couldnt find what am i missing .

I have written a simple test case to demonstrate my problem .

so if I'm not using "createDocxAndDownload" all works well if i do i gets the warning

"Cannot modify header information - headers already sent by"

can someone point what is wrong with the script ?

thanks in advanced,

iris hadar

<?php
header( 'Content-type: text/html; charset=utf-8' );
require_once '../classes/CreateDocx.inc';
$docx = new CreateDocx();

echo 'Begin ...<br />';
for( $i = 0 ; $i < 10; $i++ )
{
    echo $i . '<br />';
    flush();
    ob_flush();
   sleep(1);
}
echo 'End ...<br />';

$text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.';

$paragraphOptions = array(
    'bold' => true,
    'font' => 'Arial'
);

$docx->addText($text, $paragraphOptions);
$docx->createDocxAndDownload('../GrbCol/test');
?>