<?php require template('layout/home_goods_class');?> <?php //require template('layout/home_goods_class'); echo template('layout/home_goods_class');//打印输出模板地址 ?> 模板地址为: D:/phpStudy/WWW/shopNC/shop/templates/default/layout/home_goods_class.php/** * 返回模板文件所在完整目录 * * @param str $tplpath * @return string */ function template($tplpath){ if (strpos($tplpath,':') !== false){ $tpltmp = explode(':',$tplpath); return BASE_DATA_PATH.'/'.$tpltmp[0].'/tpl/'.$tpltmp[1].'.php'; }else{ return BASE_PATH.'/templates/'.TPL_NAME.'/'.$tplpath.'.php'; } }
|
|