但是执行print_r($Smarty->template_dir); 这条出来了信息
什么内容,贴出来

解决方案 »

  1.   


    linux下是: /usr/local/nginx/test/View
    windows下是:Array ( [0] => D:\wamp\www\KMBackgroud/View\ )怎么linux下和windows下打印出来的格式也不一样
      

  2.   

    不好意思,上面的错误的了,这个是linux下打印出来的。
    Array ( [0] => /usr/local/nginx/test/View/ ) 显示1
    Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /usr/local/nginx/test/Runtime/TemplatesCache_c/wrt4f694a4d12ab36.56330404' in /usr/local/nginx/test/Vender/Smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /usr/local/nginx/test/Vender/Smarty/sysplugins/smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('/usr/local/ngin...', '<?php /* Smarty...', Object(Smarty)) #1 /usr/local/nginx/test/Vender/Smarty/sysplugins/smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource() #2 /usr/local/nginx/test/Vender/Smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('index.html', NULL, NULL, NULL, true) #3 /usr/local/nginx/test/Controller/ControllerBase.class.php(126): Smarty_Internal_TemplateBase->display('index.html', NULL, NULL, NULL) #4 /usr/local/nginx/test/Controller/ControllerLogin.class.php(21): ControllerBase->display('index.html') #5 /usr/local/nginx/test/Controller/ControllerBase.cl in /usr/local/nginx/test/Vender/Smarty/sysplugins/smarty_internal_write_file.php on line 44windows下面打印出来的
    Array ( [0] => D:\wamp\www\KMBackgroud/View\ ) 显示1 熊惠花 bbb
      

  3.   

    linux smarty中display的内容不能显示,display之前的echo 能显示,之后的不能
      

  4.   

     楼上正解:在根目录下执行 chmod -R 777 templates_c/