首页  >  文章  >  后端开发  >  请问这段php的错误在哪?我没找到错啊

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

WBOY
WBOY原创
2016-09-05 08:44:521053浏览

这是网上找的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(); 这句话有错吗?

谢谢。

<code><?php   include "/smarty/libs/Smarty.class.php";  
  define(@#__SITE_ROOT@#, @#f:/phpstudy/WWW/smartys/smarty@#); // 最后没有斜线  
  $tpl = new Smarty();  
  $tpl->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 = @#}>@#;  
  ?></code>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn