2022-12-15 分類(lèi): 網(wǎng)站建設(shè)
一、如果僅僅是增加個(gè)自定義頁(yè),不計(jì)較文件所在目錄和名稱(chēng),可以在后臺(tái)增加專(zhuān)題,會(huì)自動(dòng)在news/project/下增加目錄和文件
二、如果要增加有特別功能的頁(yè)面,可以自定義頁(yè)面。會(huì)員功能頁(yè)和非會(huì)員功能頁(yè)的區(qū)別是:
1、會(huì)員功能頁(yè)有SecureMember(); 調(diào)用這個(gè)函數(shù)時(shí),訪問(wèn)頁(yè)面時(shí)會(huì)判斷是否登錄,沒(méi)有登錄會(huì)跳轉(zhuǎn)到login.php
2、會(huì)員功能頁(yè)要包含member.inc.php
3、會(huì)員功能頁(yè)P(yáng)ageSet函數(shù)的第一個(gè)參數(shù)是member,否則是news (即模塊名):
會(huì)員功能頁(yè)程序樣例:
define("ROOTPATH", "../"); #定義文件相對(duì)路徑,如程序在一級(jí)目錄下就是../,如果在二級(jí)目錄下就是../../ 依次類(lèi)推
include(ROOTPATH."includes/common.inc.php"); #包含函數(shù)庫(kù)
include(ROOTPATH."member/includes/member.inc.php"); #會(huì)員頁(yè)面要包含member函數(shù)庫(kù)
include("language/".$sLan.".php"); #包含當(dāng)前模塊語(yǔ)言包
include("includes/news.inc.php"); #包含本模塊函數(shù)庫(kù)
SecureMember(); #會(huì)員身份驗(yàn)證
//定義模塊名和頁(yè)面名
PageSet("member","mytest");
然后在_base_pageset數(shù)據(jù)表中插入一條記錄
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非會(huì)員功能頁(yè)程序樣例:
define("ROOTPATH", "../");
include(ROOTPATH."includes/common.inc.php");
include("language/".$sLan.".php");
include("includes/news.inc.php");
//定義模塊名和頁(yè)面名
PageSet("news","mytest");
然后在_base_pageset數(shù)據(jù)表中插入一條記錄
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
網(wǎng)頁(yè)名稱(chēng):怎樣在系統(tǒng)中增加自定義功能頁(yè)
路徑分享:http://m.newbst.com/news24/222974.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開(kāi)發(fā)、標(biāo)簽優(yōu)化、軟件開(kāi)發(fā)、做網(wǎng)站、微信小程序、網(wǎng)頁(yè)設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容