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了。 这段代码用PHP标准格式写应该是怎样的 求助:用strip_tags()函数却过滤不掉html代码 积分转置为顶天数后 如何恢复正常 架构咨询? 找一个位懂PHP的人可以兼职做PHP,每天上班四小时 我第一次写的程序不知道哪里不对了。 全文检索 sql语句怎么写???请求帮助 小问题,关于从url接受参数的问题 在php中一般如何来调试程序啊? ASP网站转换PHP网站能否实现 新手求助php Unable to create socket套接字问题 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了。