display(test.tpl)  输出结果,生成页面就停止了,后面的语句没处理

解决方案 »

  1.   

    test.tpl 内容是什么
    路径是什么?
      

  2.   

    确定以下目录确实存在,并且Apache对他们有读取、执行和书写权限
    Smarty/templates_c/
    Smarty/cache/
      

  3.   

    同问test.tpl.....<?php
    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";
    ?>试试..
    有的时候跟路径也有关系,不行的话试试绝对路径...
      

  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";
    ?>刚才那个漏写了个路径...囧....
      

  5.   

    让你的smarty报下错,$tpl->compile_check = true;
    闭着眼工作,啥也看不到
      

  6.   


    test.tpl内容就是简单的:11111111111主要用来测试下smarty使用
    在windows下可以的 ,但是在centos下怎么不行呢加了这段代码 也什么都 没有,什么都不 显示
    这些存在,路径都正确,权限也正确。
      

  7.   

    display函数可能因为错误中断了.
    去哪个类里找,看在哪中断了.
      

  8.   


    跟 http://topic.csdn.net/u/20070712/16/9219fc6a-63e0-4bc4-ac0e-9c2c85eff09e.html这个问题一样,
    但是就算 error_reporting(E_ALL);  也啥都没,一片空白
      

  9.   


    哈哈 找到问题了,谢谢各位的帮助!还是权限问题
    因为在windows下时的默认权限都正确;
    但在centos下时,修改了templates的权限,但忘记修改 templates_c 的权限了, 所以无法建立板编译程序了,也就无法display了。