title: Unable to load config file in smarty
body: <p>I'm new to PHP and smarty, I don't know how to solve this. This is a rough idea about my project directory</p>
  
  <p>MyProject</p>
  
  <pre><code>-&gt;include
  -&gt;configs-&gt;site.conf
  MyProject -&gt;include-&gt;config.php
  MyProject -&gt;libs-&gt;smarty-&gt;plugins
  MyProject -&gt;libs-&gt;smarty-&gt;sysplugins
  MyProject -&gt;libs-&gt;smarty-&gt;debug.tpl
  MyProject -&gt;libs-&gt;smarty-&gt;Smarty.class.php
  MyProject -&gt;libs-&gt;smarty-&gt;SmartyBC.class.php
  MyProject -&gt;presentation-&gt;templates-&gt;test.tpl
  MyProject -&gt;presentation-&gt;templates_c
  MyProject -&gt;presentation-&gt;application.php
  MyProject -&gt;index.php
  </code></pre>
  
  <p>I have defined a variable in my site.conf file. SITE_TITLE. I'm trying to load my config file in <strong>test.tpl</strong> like this.....</p>
  
  <pre><code>{$smarty-&gt;configLoad('site.conf')}
  </code></pre>
  
  <p>I also tried this.... </p>
  
  <pre><code>{config_load file='site.conf'}
  </code></pre>
  
  <p>But I'm getting this error....</p>
  
  <pre><code>Fatal error: Uncaught exception 'SmartyCompilerException' with message 
  'Syntax Error in template "E:\xampp\htdocs\MyProject\presentation\templates\test.tpl"
  on line 1 "{$smarty.configLoad('site.conf')}" $smarty.configLoad is invalid' 
  in  E:\xampp\htdocs\MyProject\libs\smarty\sysplugins
  \smarty_internal_templatecompilerbase.php
  :656 Stack trace: #0 E:\xampp\htdocs\MyProject\libs\smarty\sysplugins
  \smarty_internal_compile_private_special_variable.php
   (93): Smarty_Internal_TemplateCompilerBase-
   &gt;trigger_template_error('$smarty.configL...') 
  #1 E:\xampp\htdocs\MyProject\libs\smarty\sysplugins
  \smarty_internal_templatecompilerbase.php
  (473): Smarty_Internal_Compile_Private_Special_Variable
  -&gt;compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), 
  '['configLoad']', NULL, NULL) 
  #2 E:\xampp\htdocs\MyProject\libs\smarty\sysplugins
  \smarty_internal_templatecompilerbase.php
  (247): Smarty_Internal_TemplateCompilerBase
  -&gt;callTagCompiler('private_special...', Array
  , '['configLoad']') #3 E:\xampp\htdocs\Cel 
  in E:\xampp\htdocs\Project\libs\smarty\sysplugins
  \smarty_internal_templatecompilerbase.php on line 656
  </code></pre>
  
  <p><strong>config.php is this....</strong></p>
  
  <pre><code>define ( 'SITE_ROOT', dirname ( dirname ( __FILE__ ) ) );
  define ( 'PRESENTATION_DIR', SITE_ROOT . '/presentation/' );
  define ( 'BUSINESS_DIR', SITE_ROOT . '/business/' );
  define ( 'SMARTY_DIR', SITE_ROOT . '/libs/smarty/' );
  define ( 'TEMPLATE_DIR', PRESENTATION_DIR . 'templates' );
  define ( 'COMPILE_DIR', PRESENTATION_DIR . 'templates_c' );
  define ( 'CONFIG_DIR', '/include/configs' );
  </code></pre>
  
  <p><strong>application.php is this...</strong></p>
  
  <pre><code>require_once SMARTY_DIR . 'Smarty.class.php';
  
  class Application extends Smarty {
  public function __construct() {
  parent::__construct ();
  
      $this-&gt;template_dir = TEMPLATE_DIR;
      $this-&gt;compile_dir = COMPILE_DIR;
      $this-&gt;config_dir = CONFIG_DIR;
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>and this is my index.php...</strong></p>
  
  <pre><code>require_once 'include/config.php';
  
  require_once PRESENTATION_DIR . 'application.php';
  
  $application = new Application ();
  
  $application-&gt;display ( 'test.tpl' );
  </code></pre>
  
  <p>I'm using PHP 5.4.16 and smarty 3.1.10</p>
  
  <p>Any suggestions are highly appreciated.</p>