dedecms織夢系統生成wap手機版靜態頁完整版,織夢技
導讀:織夢技術織夢技術打開include目錄下的common.inc.php,在26行加入代碼: define(DEDEWAPPATH,/wap);//生成手機版靜態頁目錄 defidede手機模板dede后臺模板。
打開include目錄下的common.inc.php,在26行加入代碼:
define('DEDEWAPPATH','/wap');//生成手機版靜態頁目錄
define('DEDEWAPTEMPLATESPATH','/wap/');//手機版模板目錄templets

首先創建手機版的文章模板,這里自己創建,跟其他模板一樣,不過保存路徑/templets/wap/article_article.htm

首先找到include目錄下的arc.archives.class.php,修改文件前最好備份一下,找到函數function MakeHtml($isremote=0),函數最后一行代碼438行修改一如下:
$returl=$this->GetTrueUrl($filename);
$this->MakeWapHtml($isremote);
return $returl;

在442行增加函數代碼
function MakeWapHtml($isremote=0)
{
global $cfg_df_style,$cfg_arcdir;
$tempfile = $this->GetTempletFile();
$tempfile = str_replace('/' . $cfg_df_style . '/',DEDEWAPTEMPLATESPATH,$tempfile);
if(!file_exists($tempfile) || !is_file($tempfile))
{
}else{
global $cfg_remote_site,$fileFirst;
if($this->IsError)
{
return '';
}
$this->Fields["displaytype"] = "st";
//預編譯$th
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-18 ,文章dedecms織夢系統生成wap手機版靜態頁完整版,織夢技主要講述完整版,靜態,手機網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_29512.html