Jump to content
Fórum Script Brasil
  • 0

Dúvidas sobre o smarty


Rodolfo Barreto

Question

Estou estendendo a classe Smarty da biblioteca smarty e toda vez que eu instancio a classe SmartySetup ela não acha as pastas que eu configurei na classe e se eu estiver em um subdiretorio retorna um erro dizendo que o arquivo requerido não foi encontrado...

Se alguém poder me ajudar eu ficaria muito grato.

<?php

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

class SmartySetup extends Smarty{

public function Setup() {

$document_root = $_SERVER['DOCUMENT_ROOT'];

# seta os diretorios para o smarty

$this->template_dir = $document_root."/templates/";

$this->compile_dir = $document_root."/compile/";

$this->config_dir = $document_root."/configs/";

$this->cache_dir = $document_root."/cache/";

# define se o cache está ligado ou não

$this->caching = false;

# define o tempo para expirar o cache

$this->cache_lifetime = 10;

}

}

?>

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...