Replies: 3   Views: 3649
Php fatal error: uncaught error: call to undefined method phpdocx\\create\\createdocx::replacevaria
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 admin  · 19-01-2018 - 15:01


We recommend you to check the included samples in your package and the practical guide explains how to use both packages (classic and namespaces). For example on you can read about how to use the included autoloader or you can integrate it with Composer (

For example, the included sample Core\addText\sample_3.php that use CreateDocx and WordFragment:


require_once '../../../Classes/Phpdocx/Create/';

$docx = new Phpdocx\Create\CreateDocx();

//create a Word fragment with an image
$image = new Phpdocx\Elements\WordFragment($docx);
$imageOptions = array(
    'src' => '../../img/image.png',
    'scaling' => 50, 
    'float' => 'right',
    'textWrap' => 1 

The library includes various folders because each folder is a PHP namespace (this is how PHP namespaces work). If you don't want to use PHP namespaces, you can download and use the classic package on MY PHPDOCX page after login.