2022-12-15 分类: 网站建设
一、如果仅仅是增加个自定义页,不计较文件所在目录和名称,可以在后台增加专题,会自动在news/project/下增加目录和文件
二、如果要增加有特别功能的页面,可以自定义页面。会员功能页和非会员功能页的区别是:
1、会员功能页有SecureMember(); 调用这个函数时,访问页面时会判断是否登录,没有登录会跳转到login.php
2、会员功能页要包含member.inc.php
3、会员功能页PageSet函数的第一个参数是member,否则是news (即模块名):
会员功能页程序样例:
define("ROOTPATH", "../"); #定义文件相对路径,如程序在一级目录下就是../,如果在二级目录下就是../../ 依次类推
include(ROOTPATH."includes/common.inc.php"); #包含函数库
include(ROOTPATH."member/includes/member.inc.php"); #会员页面要包含member函数库
include("language/".$sLan.".php"); #包含当前模块语言包
include("includes/news.inc.php"); #包含本模块函数库
SecureMember(); #会员身份验证
//定义模块名和页面名
PageSet("member","mytest");
然后在_base_pageset数据表中插入一条记录
name varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY coltype varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY pagename varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY非会员功能页程序样例:
define("ROOTPATH", "../");
include(ROOTPATH."includes/common.inc.php");
include("language/".$sLan.".php");
include("includes/news.inc.php");
//定义模块名和页面名
PageSet("news","mytest");
然后在_base_pageset数据表中插入一条记录
name varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY coltype varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY pagename varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY
文章标题:怎样在系统中增加自定义功能页
标题路径:https://www.cdcxhl.com/news/222974.html
成都网站建设公司_创新互联,为您提供品牌网站设计、品牌网站制作、网站设计、网站收录、电子商务、外贸建站
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联
猜你还喜欢下面的内容