Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Como estender corretamente a classe do Smarty

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: Portuguese
View previous topic :: View next topic  
Author Message
rodolfobarretoweb
Smarty Rookie


Joined: 12 Oct 2011
Posts: 8

PostPosted: Wed Oct 12, 2011 2:33 pm    Post subject: Como estender corretamente a classe do Smarty Reply with quote

Bom dia galera, estou com um prolema, espero que vocês possam me ajudar



Code:

<?php
require($_SERVER['DOCUMENT_ROOT'].'/breakbeat/php/lib/smarty/libs/Smarty.class.php');

class SmartySetup extends Smarty{
    public function SmartySetup() {
       
        $this->Smarty();
       
        $dir = $_SERVER['DOCUMENT_ROOT']."/breakbeat/";
        $this->compile_dir  = $dir.'compile/';
        $this->cache_dir    = $dir.'cache/';
        $this->template_dir = $dir.'templates/';
        $this->config_dir   = $dir.'configs/';
    }
}
?>



Como vocês podem ver acima colei minha classe que faz extensão com a classe do Smarty e também colei minha estrutura de diretórios para facilitar a compreensão de vocês.

Só que quando eu tento executa-lo isso da o seguinte erro.


Warning: Invalid argument supplied for foreach() in D:\EasyPHP-5.3.8.0\www\breakbeat\php\lib\smarty\libs\sysplugins\smarty_resource.php on line 242

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'user_cadastro.tpl'' in D:\EasyPHP-5.3.8.0\www\breakbeat\php\lib\smarty\libs\sysplugins\smarty_internal_templatebase.php:116 Stack trace: #0 D:\EasyPHP-5.3.8.0\www\breakbeat\php\lib\smarty\libs\sysplugins\smarty_internal_templatebase.php(345): Smarty_Internal_TemplateBase->fetch('user_cadastro.t...', NULL, NULL, NULL, true) #1 D:\EasyPHP-5.3.8.0\www\breakbeat\php\smarty_setup.php(4): Smarty_Internal_TemplateBase->display('user_cadastro.t...') #2 D:\EasyPHP-5.3.8.0\www\breakbeat\index.php(2): require_once('D:\EasyPHP-5.3....') #3 {main} thrown in D:\EasyPHP-5.3.8.0\www\breakbeat\php\lib\smarty\libs\sysplugins\smarty_internal_templatebase.php on line 116


Se vocês poderem me ajudar nessa problema eu ficaria muito grato.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP