将这段加在你的默认首页文件中。 -------------------------------------------------------------------------------------------------------------------------------------------- /** 检测是否是移动设备访问 **/ require_once('mobile_device_detect.php'); mobile_device_detect(true,true,true,true,true,true,true,'http://wap.876543.net',false); -------------------------------------------------------------------------------------------------------------------------------------------- 以上的只能实现PHP程序的wap跳转,我再把我在网上找的目前可行的ASP程序的wap跳转发给大家 -------------------------------------------------------------------------------------------------------------------------------------------- <% dim enterurl if instr(Request.ServerVariables("http_accept"),"wap")>0 then enterurl="http://wap.876543.net/" '手机访问网站http://www.876543.net,自动跳转到http://wap.876543.net/ response.redirect(enterurl) response.end else enterurl="http://www.876543.net/index.html" '电脑访问网站http://www.876543.net,自动跳转到/index.html response.redirect(enterurl) response.end end if %> --------------------------------------------------------------------------------------------------------------------------------------------
|