织梦升级最新版本(2018.1.9)以后有个bug,就是在手机端搜索,但是搜索页不是手机端的搜索页面,是PC端的,下面说说解决的方法
方法:
找到/plus/search.php 这个文件,搜索如下代码,大概在20行左右
$mid = (isset($mid) && is_numeric($mid)) ? $mid : 0;
在这段代码的下面添加:
$mobile = (isset($mobile) && is_numeric($mobile)) ? $mobile : 0;
if ( $mobile==1 )
{
define('DEDEMOB', 'Y');
}
1 $mobile = (isset($mobile) && is_numeric($mobile)) ? $mobile : 0; 2 if ( $mobile==1 ) 3 { 4 define( 'DEDEMOB' , 'Y' ); 5 } |
然后在搜索页的地方form中添加一个隐藏的input,name为mobile,value值为1,如下代码:
<input type=”hidden” name=”mobile” value=”1″ />
如图所示,操作完上面两部后手机端搜索页面已经可以自动跳转到search_m.htm页面。
© 版权声明
文章搜集于网络,如有侵权请联系本站,转载请说明出处。
THE END
暂无评论内容