Forum


Replies: 6   Views: 3610
Importheadersandfooters() getting error
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 sreekumar  · 15-03-2013 - 11:09

hi all

i started working in phpdocx.

but now when i am trying to add footer, it shows an error message.


"Fatal error: Call to undefined method CreateDocx::importHeadersAndFooters() in C:\xampp\htdocs\phpdocx_demo\p1.php on line 5"


this is my code



<?php
require_once("C:/xampp/htdocs/phpdocx_demo/phpdocx_free/classes/CreateDocx.inc");
$docx = new CreateDocx();
$docx ->importHeadersAndFooters('C:/xampp/htdocs/phpdocx_demo/templateHeaderAndFooter.docx', 'footer');

// templateHeaderAndFooter.docx file contains one line, which should come as footer

$text ="welcome home";
$docx->addText($text);

$docx->createDocx('C:/xampp/htdocs/phpdocx_demo/hello_world_3');
?>

what to do