最好访问都针对根目录。否则很乱。

解决方案 »

  1.   

    终于好了,谢谢!
    class.smarttemplate.php<?php /**
    * 为smarttemplate设置3个真实路径:编译临时文件目录,缓存目录,模板目录
    * /home/ka1ijikijq/wwwroot/smarttemplate/tmp/
    * /home/ka1ijikijq/wwwroot/smarttemplate/tmp/
    * /home/ka1ijikijq/wwwroot/smarttemplate

    * @author aiiiq
    * @today 2:19 05-8-28
    */ $_CONFIG = array(
    smarttemplate_compiled => dirname(__FILE__) . "/tmp/",
    smarttemplate_cache => dirname(__FILE__) . "/tmp/",
    cache_lifetime => 600,
    template_dir => dirname(__FILE__) . "/",
    );
    /**
    * SmartTemplate Class

    * 'Compiles' HTML-Templates to PHP Code
    Hello_World.php<?php require_once "/home/ka1ijikijq/wwwroot/smarttemplate/class.smarttemplate.php";
    // 同样需要绝对路径 $page = new SmartTemplate("Hello_World.html");
    $page->assign('TITLE', 'Hello World!');
    $page->output();?>