其实很简单
require_once (dirname(__FILE__) . "/include/common.inc.php");require_once DEDEINC."/arc.partview.class.php"; $pv = new PartView();$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" ."default/ceshi.htm");$pv->Display();
设置好模板,显示就可以了。
如果想让里面自己写php代码 也可以这样
<?php/*** @version $Id: index.php 1 9:23 2010-11-11 tianya $* @package DedeCMS.Site* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.* @license http://help.dedecms.com/usersguide/license.html* @link http://www.dedecms.com*/ require_once (dirname(__FILE__) . "/include/common.inc.php"); require_once DEDEINC."/arc.partview.class.php"; $pv = new PartView(); $sql="select * from dede_archives where id=1"; $db->Execute('me',$sql);while($arr = $dsql->GetArray('me')){echo $arr['id'].$arr['title']."<br/>";}?><div style="background:#D6D6D6;"><?$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" ."default/ceshi.htm");$pv->Display(); /*$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" ."default/ceshi.htm"); $pv->Display();*/?></div>
如果本文对你有帮助,欢迎打赏本站