michael: smarty und dateipfade beim einbinden

Beitrag lesen

hallo alle zusammen,

ich mach gerade meine ersten gehversuche mit smarty und will mir einen konstruktor bauen, der beim aufruf einer neuen smarty-instanz automatisch template-,config- und cache-dirs einbaut.

leider klappt das vorn und hinten mit dem pfad nicht... und mir will einfach nicht in den kopf wiso !!

auf meinem server sieht die smarty struktur aus wie folgt: castor:/www/_smarty_guestbook/_smarty # ls -l total 0 drwxr-xr-x    7 jflash   users         184 Sep 28 01:18 . drwxrwxrwx    4 jflash   users         168 Sep 28 12:13 .. drwxrwxrwx    2 jflash   users          48 Sep 27 23:31 cache drwxrwxrwx    2 jflash   users          48 Sep 27 23:31 configs drwxr-xr-x    4 jflash   users         248 Sep 28 01:18 libs drwxrwxrwx    2 jflash   users          80 Sep 28 01:34 templates drwxrwxrwx    2 jflash   users          96 Sep 28 12:08 templates_c castor:/www/_smarty_guestbook/_smarty #

und ich versuche es einzubinden mit (DOC_ROOT ist eine konstante, die ich vorher definiert habe):

require(DOC_ROOT."/_smarty/libs/Smarty.class.php"); require(DOC_ROOT."/_language/de.lang.php");

$smarty = new Smarty;

class MySmarty extends Smarty { function MySmarty() {  $this->Smarty();  $this->template_dir = "/www/_smarty_guestbook/_smarty/templates/";  $this->compile_dir = "/www/_smarty_guestbook/_smarty/templates_c/";  $this->config_dir = "/www/_smarty_guestbook/_smarty/configs/";  $this->cache_dir = "/www/_smarty_guestbook/_smarty/cache/";   }  }

die pfade stimmen doch ?! stattdesen kommt nur ein : Fatal error: Smarty error: the $compile_dir 'templates_c' does not exist, or is not a directory. in /www/_smarty_guestbook/_smarty/libs/Smarty.class.php on line 1084

will mir nicht so ganz in den kopf? überseh ich irgendwas?

vielen dank für eure hilfe, michael