Dear all
I'm getting blank document while trying to create a simple hello world example
Envionment:
Windows - PHP 5.3.1/tidy/zip/XSLT enabled
Debion Linux - PHP 5.3.8 /zip/XSLT enabled
Centos Linux - PHP 5.4.1 /Zip/XSLT enabled
Used Code:
require_once 'classes/CreateDocx.inc';
$docx = new CreateDocx();
$text = array();
$text[] =
array(
'text' => 'I am going to write'
);
$text[] =
array(
'text' => ' Hello World!',
'b' => 'on'
);
$text[] =
array(
'text' => ' using bold characters.'
);
$docx->addText($text);
$docx->createDocx('tmp/hello_world_2');
Log:
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Create a temp file to use as initial ZIP file. DOCX is a ZIP file.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Set language.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Add text to word document.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Set DOCX name to: tmp/hello_world_2.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO DOCX is a new file, not a template.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Remove existing template tags.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Add word/document.xml content to DOCX file.
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Close ZIP file
2013-07-22T16:54:31+05:30 phpdocx_logger INFO Copy DOCX file using a new name.
File get created but with no content.
Please advices