0.上传install.php到根目录下,运行你的域名/install.php
如:eoocms.com/install.php
1.将upload下的3个文件夹 FTP上传到站点根目录下
2.配置你的根目录下的config.inc.php
加入以下代码:
#[编码]
$charset='utf-8';
$dbcharset='utf8';
可参考我发你的“参考config.inc.php"文件。
3.打开base emplates下header.htm加入以下手机跳转代码:
(如果你未修改过header.htm,也可以直接复制我给的header.htm)
<script language="javascript">
(function(){
var res = GetRequest();
var par = res['index'];
if(par!='gfan'){
var ua=navigator.userAgent.toLowerCase();
var contains=function (a, b){
if(a.indexOf(b)!=-1){return true;}
};
var toMobileVertion = function(){
window.location.href = '/wap'
}
if(contains(ua,"ipad")||(contains(ua,"rv:1.2.3.4"))||(contains(ua,"0.0.0.0"))||(contains(ua,"8.0.552.237"))){return false}
if((contains(ua,"android") && contains(ua,"mobile"))||(contains(ua,"android") && contains(ua,"mozilla")) ||(contains(ua,"android") && contains(ua,"opera"))
||contains(ua,"ucweb7")||contains(ua,"iphone")){toMobileVertion();}
}
})();
function GetRequest() {
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
</script>