3.1.16. loadConfig()

void loadConfig ( mixed $config )

Loads the OPT configuration. $config may be both a configuration filename (PHP ini files syntax) or an array containing the directives. Instead of using it, you may also specify the configuration manually by specifying the configuration field values in optClass object.

Example 3.8. Three ways of setting the configuration

<?php
  // Load a configuration from an external file
  $tpl -> loadConfig('config.php');
  // Load from an array
  $tpl -> loadConfig(array(
    'root' => './templates/',
    'compile' => './templates_c/',
    'debugConsole' => false
  ));
  // Specify the config manually
  $tpl -> root = './templates/';
  $tpl -> compile = './templates_c/';
?>