Linux下 Smarty中的display显示问题

爱在丽江leslex 2012-03-21 11:09:38
在windows下好使,但是在linux下就不行了,我在linux下的路径是\\192.168.73.112\ubuntu\usr\local\nginx\test。 所有的文件都放在test下面。然后Smarty需要调用的HTML放在\\192.168.73.112\ubuntu\usr\local\nginx\test\View下。
我在linux下打印template_dir出来是/usr/local/nginx/test/View。

但是执行print_r($Smarty->template_dir); 这条出来了信息,
$Smarty->display('index.html');但是却没有显示界面。

谁能告诉我原因,只要相关的,靠谱的都告诉我。
...全文
425 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
qw_xingzhe 2014-03-18
  • 打赏
  • 举报
回复
楼上正解:在根目录下执行 chmod -R 777 templates_c/
爱在丽江leslex 2012-03-21
  • 打赏
  • 举报
回复
linux smarty中display的内容不能显示,display之前的echo 能显示,之后的不能
爱在丽江leslex 2012-03-21
  • 打赏
  • 举报
回复
不好意思,上面的错误的了,这个是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 44

windows下面打印出来的
Array ( [0] => D:\wamp\www\KMBackgroud/View\ ) 显示1 熊惠花 bbb
爱在丽江leslex 2012-03-21
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 xuzuning 的回复:]

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

linux下是: /usr/local/nginx/test/View
windows下是:Array ( [0] => D:\wamp\www\KMBackgroud/View\ )

怎么linux下和windows下打印出来的格式也不一样
xuzuning 2012-03-21
  • 打赏
  • 举报
回复
但是执行print_r($Smarty->template_dir); 这条出来了信息
什么内容,贴出来
coder 2012-03-21
  • 打赏
  • 举报
回复
有木有权限啊

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧