路径用的相对路径,比如./templates 但还是出现syntax error: unrecognized tag: (Smarty_Compiler.class.php, line 446) in C:\wamp\www\news\common\smarty\Smarty.class.php on line 1095
求高手指教

解决方案 »

  1.   

    $smarty->template_dir="./templates"
    $smarty->compile_dir="./templates_c"
    $smarty->cache_dir="./cache";
      

  2.   


     $smarty->config_dir   = "Smarty/Config_File.class.php";                    //目录变量
       $smarty->caching      = false;           //是否使用缓存、项目在调用期间、建议不要打开
       $smarty->template_dir = './templates/'.$smartytpl;           //设置模板目录
       $smarty->compile_dir  = './templates_c/';               //设置编译目录
       $smarty->cache_dir    = './smarty_cache/';                 //缓存文件
      

  3.   

    $smarty->template_dir = './templates/'.$smartytpl;           //设置模板目录
    为什么要加.$smartytpl??还有那个是数字1还是字母l??
      

  4.   

    为什么还要在模板目录里面加一个tpl的东西啊,很好奇,不知道是什么东西