Smarty问题求助 display(test.tpl) 输出结果,生成页面就停止了,后面的语句没处理 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 test.tpl 内容是什么路径是什么? 确定以下目录确实存在,并且Apache对他们有读取、执行和书写权限Smarty/templates_c/Smarty/cache/ 同问test.tpl.....<?phprequire dirname(__FILE__).'/Smarty/libs/Smarty.class.php';echo "1";$tpl = new Smarty();echo "2";$tpl->template_dir = './Smarty/templates/';$tpl->compile_dir = './templates_c/';$tpl->config_dir = './Smarty/configs/';$tpl->cache_dir = './Smarty/cache/';echo "3";$tpl->display("test.tpl");echo "4";?>试试..有的时候跟路径也有关系,不行的话试试绝对路径... <?phprequire dirname(__FILE__).'/Smarty/libs/Smarty.class.php';echo "1";$tpl = new Smarty();echo "2";$tpl->template_dir = './Smarty/templates/';$tpl->compile_dir = './Smarty/templates_c/';$tpl->config_dir = './Smarty/configs/';$tpl->cache_dir = './Smarty/cache/';echo "3";$tpl->display("test.tpl");echo "4";?>刚才那个漏写了个路径...囧.... 让你的smarty报下错,$tpl->compile_check = true;闭着眼工作,啥也看不到 test.tpl内容就是简单的:11111111111主要用来测试下smarty使用在windows下可以的 ,但是在centos下怎么不行呢加了这段代码 也什么都 没有,什么都不 显示这些存在,路径都正确,权限也正确。 display函数可能因为错误中断了.去哪个类里找,看在哪中断了. 跟 http://topic.csdn.net/u/20070712/16/9219fc6a-63e0-4bc4-ac0e-9c2c85eff09e.html这个问题一样,但是就算 error_reporting(E_ALL); 也啥都没,一片空白 哈哈 找到问题了,谢谢各位的帮助!还是权限问题因为在windows下时的默认权限都正确;但在centos下时,修改了templates的权限,但忘记修改 templates_c 的权限了, 所以无法建立板编译程序了,也就无法display了。 内容已被编辑! 2维数组为什么只输出一个? 求正则:匹配CSS中的url路径 如何用非js方法得到option选项的值? 麻烦高手帮忙看一下代码,在线等待 关于控制窗口的菜单栏和工具栏的问题 关于php快速替换html用什么方法啊 菜鸟问题:简单函数转换(asp转php) 请问:shuffle结果好像一样,我哪写错了?? 请问如何将table中的单元格设置为可写? fopen函数求解 答者有分,老问题,PHP中session的存在方式
路径是什么?
Smarty/templates_c/
Smarty/cache/
require dirname(__FILE__).'/Smarty/libs/Smarty.class.php';
echo "1";
$tpl = new Smarty();
echo "2";
$tpl->template_dir = './Smarty/templates/';
$tpl->compile_dir = './templates_c/';
$tpl->config_dir = './Smarty/configs/';
$tpl->cache_dir = './Smarty/cache/';
echo "3";
$tpl->display("test.tpl");
echo "4";
?>试试..
有的时候跟路径也有关系,不行的话试试绝对路径...
<?php
require dirname(__FILE__).'/Smarty/libs/Smarty.class.php';
echo "1";
$tpl = new Smarty();
echo "2";
$tpl->template_dir = './Smarty/templates/';
$tpl->compile_dir = './Smarty/templates_c/';
$tpl->config_dir = './Smarty/configs/';
$tpl->cache_dir = './Smarty/cache/';
echo "3";
$tpl->display("test.tpl");
echo "4";
?>刚才那个漏写了个路径...囧....
闭着眼工作,啥也看不到
test.tpl内容就是简单的:11111111111主要用来测试下smarty使用
在windows下可以的 ,但是在centos下怎么不行呢加了这段代码 也什么都 没有,什么都不 显示
这些存在,路径都正确,权限也正确。
去哪个类里找,看在哪中断了.
跟 http://topic.csdn.net/u/20070712/16/9219fc6a-63e0-4bc4-ac0e-9c2c85eff09e.html这个问题一样,
但是就算 error_reporting(E_ALL); 也啥都没,一片空白
哈哈 找到问题了,谢谢各位的帮助!还是权限问题
因为在windows下时的默认权限都正确;
但在centos下时,修改了templates的权限,但忘记修改 templates_c 的权限了, 所以无法建立板编译程序了,也就无法display了。