Cookbook

Setting phpdocxconfig.ini with PHP code

phpdocx includes the file config/phpdocxconfig.ini in all licenses to set the license key and other settings such as the default language and paper size, or transform options.

In addition to fill this INI file, the available options can be customized updating the static var PhpdocxUtilities::$_phpdocxConfig. This allows using ENV vars and PHP code to define all options dynamically instead of using fixed values in the INI file.

The following code updates the license key option:

The whole INI file can also be customized before creating the CreateDocx object: