Smarty läuft einfach nicht

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Smarty läuft einfach nicht

    Hallo,

    ich habe heute versucht Smarty bei mir zu installieren. Ich habe eine normale XAMPP Installation bei mir laufen, leider bringe ich das Smarty-System nicht zum laufen.

    Das Manual verursacht bei mir mehr Probleme als Hilfe.

    Habe mir in htdocs den Ordner "smarty" erstellt und darin liegt die Datei "libs". Ebenfalls im Ordner "smarty" liegen die Dateien "index.php" und "setup.php".

    index.php:
    PHP Code:
    <?php

    require('setup.php');

    $smarty = new Smarty_GuestBook;
    $smarty->assign('name','Ned');
    $smarty->display('index.tpl');

    ?>
    setup.php:
    PHP Code:
    <?php

    // Smarty Library Dateien laden
    define('SMARTY_DIR','libs/');
    require(
    SMARTY_DIR.'Smarty.class.php');

    class 
    Smarty_GuestBook extends Smarty {
      function 
    Smarty_GuestBook() {
        
    // Konstruktor. Diese Werte werden für jede Instanz automatisch gesetzt
        
    $this->Smarty();

        
    $this->template_dir 'templates/';
        
    $this->compile_dir 'templates_c/';
        
    $this->config_dir 'configs/';
        
    $this->cache_dir 'cache/'

        
    $this->caching true;
        
    $this->assign('app_name','Guest Book');
      }
    }

    ?>
    Die Ordner "templates", "templates_c", "configs" und "cache" sind ebenfalls im Ordner "smarty".



    Beim Aufruf der Seite "index.php" bekomme ich immer diese Fehlermeldung:
    PHP Code:
    Fatal errorSmarty errorthe $cache_dir 'cache/' does not exist, or is not a directoryin C:\Programme\xampp\htdocs\smarty\libs\Smarty.class.php on line 1095 
    Ich habe die neueste Smarty Version und an der datei "Smarty.class.php" nichts gemacht.

    Gruß,
    Peter

  • #2
    Du hast ein Verzeichnis chache, benötigt wird aber ein Verzeichnis cache.

    Comment


    • #3
      Danke, das wars. *peinlich*
      Gruß,
      Peter

      Comment

      Working...
      X