欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

请问这段php的错误在哪?我没找到错啊

程序员文章站 2022-04-06 15:25:13
...
这是网上找的smarty设置的段代码。

一开始提示
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in F:phpstudyWWWsmartysconfig.php on line 2
我看到第二行没问题啊,于是自己从新敲了一遍,一抹一样的,就好了。

然后提示
Parse error: syntax error, unexpected T_VARIABLE in F:phpstudyWWWsmartysconfig.php on line 4
这就很费解了,$tpl = new Smarty(); 这句话有错吗?

谢谢。

template_dir = __SITE_ROOT . "/templates/";  
  $tpl->compile_dir = __SITE_ROOT . "/templates_c/";  
  $tpl->config_dir = __SITE_ROOT . "/configs/";  
  $tpl->cache_dir = __SITE_ROOT . "/cache/";  
  $tpl->left_delimiter = @#right_delimiter = @#}>@#;  
  ?>
相关标签: php smarty