Destoon 8.0 PC端訪問手機端地址方法的方法匯總(2023年5月21日可用)
默認DESTOON在電腦上是不能訪問移動端網址的,會有跳到到一個默認的中轉頁,如下圖,那么如果想用PC端訪問移動端網址,應該怎么辦呢,下面 本站就依兩個目為大家講解一下,新測有效.
注釋掉一下內容
?

原代碼:
目的一、去除DESTOON中轉頁,可使電腦直接訪問移動端網址,同是保留移動端樣式,以便于調試。
1、打開文件include/mobile.inc.php
注釋掉一下內容
//if(is_pc() && strpos($DT_URL, 'device.php') === false) dheader(DT_PATH.'api/mobile.php?action=device&uri='.urlencode($head_pc));
2、mobile模板目錄 header.htm
?注釋掉這行
?
//{if !DT_DEBUG}
//if(!('ontouchend' in document) && window.location.href.indexOf('device.php') == -1) //window.location='{DT_MOB}api/device.php?uri={urlencode($head_pc)}';
//{/if}
修改后可用瀏覽器直接訪問手機端即可。
注:原文轉載于:https://www.cnblogs.com/chinafine/articles/10513823.html
目的二、電腦端訪問移動端網址時,自動跳轉為PC端URL。
修改include/mobile.inc.php 第八行代碼
if(is_pc() && strpos($DT_URL, ‘device.php’) === false) dheader( DT_PATH.’api/mobile.php?action=device&uri=’.urlencode($head_pc)?);
更改后的代碼:
if(is_pc() && strpos($DT_URL, ‘device.php’) === false) dheader($head_pc);
注:原文轉載于王曉博客,地址 https://www.wx1986.com/program/155.html
聲明:本站所有文章資源內容,如無特殊說明或標注,均為采集網絡資源。如若本站內容侵犯了原著者的合法權益,可聯系本站刪除。
