自己在根目录添加了一个 a.php<?php
include(dirname(__FILE__).'/config/config.inc.php');
$smarty->display(_PS_THEME_DIR_.'payment-inf.tpl');
?>
接着在/themes/iestore/添加了一个a.tpl{include file=$tpl_dir./header.tpl}<h2>{l s='My new page.'}</h2>{include file=$tpl_dir./footer.tpl}
结果链接到a.php一片空白,不知道怎么弄,
请高人指点一下!

解决方案 »

  1.   

    应该是你页面出错了。
    $smarty实例化了吗??
      

  2.   

    命名有问题 payment-inf.tpla.tpl
      

  3.   

    你display的不是'payment-inf.tpl'吗  怎么写个a.tpl?
      

  4.   

    a.php改成<?php
    include(dirname(__FILE__).'/config/config.inc.php');
    $smarty->display(_PS_THEME_DIR_.'a.tpl');
    ?>也不行啊!访问a.php页面一片空白!
      

  5.   

    你要把smarty的class文件包含进来,并实例化它,再来使用include(dirname(__FILE__).'/config/config.inc.php');
    include('*******/smarty/Smarty.class.php');
    $smarty = new Smarty();
    echo _PS_THEME_DIR_.'a.tpl';//再看下这个地址是不是正确的
    $smarty->display(_PS_THEME_DIR_.'a.tpl');