PHP代码:这段代码位于主目录下page.php
<?php
require_once './source/class/class_core.php';
$discuz = & discuz_core::instance();
$discuz->cachelist = $cachelist;
$discuz->init();
$template = 'diy:newpage/'.$_GET['mod'];
if (!in_array($_GET['mod'], array('order','charge'))){
$template = 'diy:portal/index';
}
include_once template($template); //这是调用template下对应的模版
模版代码:这段代码位于相应的模版文件夹下order.htm
<!--{subtemplate common/header_portal}-->
<div>充值页面</div>
<!--{if $_G['uid']}-->
已经登录111111111111111<br>
$_G['username']
<!--{else}-->
没有登录
<!--{/if}-->
<!--{subtemplate common/footer_portal}-->
访问页面:page.php?mod=order
如果要添加其它页面,直接在模版文件夹下面创建即可,访问的时候把mod的值对应的传上就会调用相应的模版。