好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

emlog判断是否为手机浏览器

emlog利用函数判断客户端是否为手机浏览器:

打开模板的 module.php,添加下面的代码:

<?php
function is_mobile() {
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$mobile_browser = Array(
"mqqbrowser", //手机QQ浏览器
"opera mobi", //手机opera
"juc","iuc",//uc浏览器
"fennec","ios","applewebKit/420","applewebkit/525","applewebkit/532","ipad","iphone","ipaq","ipod",
"iemobile", "windows ce",//windows phone
"240×320","480×640","acer","android","anywhereyougo.com","asus","audio","blackberry","blazer","coolpad" ,"dopod", "etouch", "hitachi","htc","huawei", "jbrowser", "lenovo","lg","lg-","lge-","lge", "mobi","moto","nokia","phone","samsung","sony","symbian","tablet","tianyu","wap","xda","xde","zte"
);
$is_mobile = false;
foreach ($mobile_browser as $device) {
if (stristr($user_agent, $device)) {
$is_mobile = true;
break;
}
}
return $is_mobile;
}?>

is_mobile()函数返回布尔值,一般用法是在内容页面判断是否手机浏览器:

<?php if(is_mobile()):?>
    //只有手机客户端才输出
    ... ...
<?php endif; ?>
<?php if(!is_mobile()):?>
    //只有非手机客户端才输出
    ... ...
<?php endif; ?>

自己试试吧~

点赞1
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
sevenguard
 sevenguard 2019-02-15 08:18回复
#85
<a href="http://www.hinogi.com/air-jordan-b-mo-himmelblau-schwarz-schuhej">air jordan b mo himmelblau schwarz</a> <a href="http://www.prontosignsus.com/herre-asics-gel-noosa-tri-8-sort-lyser%C3%B8d-skoh">herre asics gel noosa tri 8 sort lyser酶d</a> <a href="http://www.ticahome.com/nike-air-max-90-em-violet-argent-chaussuresh">nike air max 90 em violet argent</a> <a href="http://www.prformusic.com/carolina-panthers-fishing-hat-hatl">carolina panthers fishing hat</a> <a href="http://www.tatilblogu.com/nike-zoom-vomero-jaune-noir-chaussuresh">nike zoom vomero jaune noir</a> <a href="http://www.danieladirosa.com/air-jordan-3-retro-sport-azul-zapatosp">air jordan 3 retro sport azul</a>
sevenguard http://www.sevenguard.com/
vanltl
 vanltl 2019-02-13 00:41回复
#84
<a href="http://www.sousoushop.com/mennns-asics-gel-kinsei-5-rosa-hvit-obuvj">mennns asics gel kinsei 5 rosa hvit</a> <a href="http://www.rcfitcamp.com/nike-zoom-structure-19-verde-bianca-scarpep">nike zoom structure 19 verde bianca</a> <a href="http://www.milajerdchat.com/nike-air-max-bw-jaune-oranger-chaussuresh">nike air max bw jaune oranger</a> <a href="http://www.girisweb.com/prada-sunglasses-online-pradah">prada sunglasses online</a> <a href="http://www.abcmovieplot.com/baltimore-ravens-89-steve-smith-sr-2014-purple-hoodie-nfli">baltimore ravens 89 steve smith sr 2014 purple hoodie</a> <a href="http://www.oldhalliwell.com/kvinders-nike-kobe-9-low-r%C3%B8d-lilla-skoq">kvinders nike kobe 9 low r酶d lilla</a>
vanltl http://www.vanltl.com/
lukasshort
 lukasshort 2019-02-12 07:31回复
#83
<a href="http://www.flatoyota.com/air-jordan-1-retro-high-og-hvit-varsity-r%C3%B8d-scarpef">air jordan 1 retro high og hvit varsity r酶d</a> <a href="http://www.fotokompass.com/nike-air-force-one-b%C3%B8rn-bl%C3%A5-lyser%C3%B8d-obuvc">nike air force one b酶rn bl氓 lyser酶d</a> <a href="http://www.padcrashin.com/nike-air-max-courtbtoutistec-4.3-limited-edition-scarpea">nike air max courtbtoutistec 4.3 limited edition</a> <a href="http://www.tickboxit.com/air-jordan-17-sort-desert-chaussuresg">air jordan 17 sort desert</a> <a href="http://www.dvrordie.com/le-coq-sportif-schuhe-himmelblau-rot-kurpesf">le coq sportif schuhe himmelblau rot</a> <a href="http://www.francisstiff.com/herre-nike-flyknit-lunar-3-lyser%C3%B8d-gul-obuva">herre nike flyknit lunar 3 lyser酶d gul</a>
lukasshort http://www.lukasshort.com/
grassmannword
 grassmannword 2019-02-12 00:19回复
#82
<a href="http://www.blickpoy.com/air-jordan-12-ovo-for-venta-oregon-butyc">air jordan 12 ovo for venta oregon</a> <a href="http://www.daonmobile.com/adidas-neo-mesh-hvit-bl%C3%A5-obuvg">adidas neo mesh hvit bl氓</a> <a href="http://www.forfreequotes.com/adidas-superstar-plata-glitter-stripes-kurpesa">adidas superstar plata glitter stripes</a> <a href="http://www.housemykonos.com/vibram-fivefingers-kso-rosa-lilla-kurpesf">vibram fivefingers kso rosa lilla</a> <a href="http://www.jennasellswax.com/polo-ralph-lauren-herren-italia-big-pony-down-jacket-kaffee-poloz">polo ralph lauren herren italia big pony down jacket kaffee</a> <a href="http://www.linguatravels.com/nike-lunarglide-7-femminile-oro-viola-scarpeb">nike lunarglide 7 femminile oro viola</a>
grassmannword http://www.grassmannword.com/
syairshamyoun
 syairshamyoun 2019-02-11 06:47回复
#81
<a href="http://www.theskifanatic.com/maschio-nike-free-run-2-rosso-arancia-scarpel">maschio nike free run 2 rosso arancia</a> <a href="http://www.bestoftumblr.com/nike-sb-stefan-janoski-max-womens-white-green-shoesj">nike sb stefan janoski max womens white green</a> <a href="http://www.thehogrider.com/michael-kors-hamilton-ew-satchel-mkh">michael kors hamilton ew satchel</a> <a href="http://www.artpreneure.com/air-jordan-retro-13-kvinners-bl%C3%A5-r%C3%B8d-obuvi">air jordan retro 13 kvinners bl氓 r酶d</a> <a href="http://www.thefarmergirl.com/nike-lunar-force-1-low-maschio-university-rosso-scarpej">nike lunar force 1 low maschio university rosso</a> <a href="http://www.shetablink.com/womens-asics-gel-kayano-21-green-purple-shoesh">womens asics gel kayano 21 green purple</a>
syairshamyoun http://www.syairshamyoun.com/
fiestanetwork
 fiestanetwork 2019-02-09 18:57回复
#80
<a href="http://www.sugarforspice.com/michael-kors-shoulder-bags-logo-monogram-large-beige-mkh">michael kors shoulder bags logo monogram large beige</a> <a href="http://www.mybancorphsa.com/air-jordan-retro-1-kvinners-rosa-bl%C3%A5-obuvi">air jordan retro 1 kvinners rosa bl氓</a> <a href="http://www.scopatore.com/nike-cortez-grigio-argento-scarpej">nike cortez grigio argento</a> <a href="http://www.galacticlogos.com/nike-lebron-13-mens-grey-shoesh">nike lebron 13 mens grey</a> <a href="http://www.ispardmore.com/adidas-tubular-runner-plata-rojo-zapatosk">adidas tubular runner plata rojo</a> <a href="http://www.radioramabc.com/air-jordan-retro-1-mujeres-cielo-azul-gris-zapatosp">air jordan retro 1 mujeres cielo azul gris</a>
fiestanetwork http://www.fiestanetwork.com/
cialislaw
 cialislaw 2019-02-09 12:45回复
#79
<a href="http://www.eworklife.com/oakley-radar-pitch-camo-sunglasses-sunglassese">oakley radar pitch camo sunglasses</a> <a href="http://www.fullcountkbo.com/calgary-flames-hockey-jersey-nflr">calgary flames hockey jersey</a> <a href="http://www.shackofstones.com/nike-flyknit-racer-blue-grey-skoa">nike flyknit racer blue grey</a> <a href="http://www.tamworthbacon.com/pink-red-womens-adidas-gazelle-boost-shoes-sneakere">pink red womens adidas gazelle boost shoes</a> <a href="http://www.dvmengineers.com/nike-free-tr-guld-gr%C3%B8n-kurpesa">nike free tr guld gr酶n</a> <a href="http://www.questoffine.com/nike-darwin-femmes-noir-sneakerb">nike darwin femmes noir</a>
[url=http://www.cialislaw.com/]cialislaw[/url]
intellalegal
 intellalegal 2019-02-08 22:44回复
#78
<a href="http://www.ortzproducts.com/kvinners-air-jordan-retro-3-gull-rosa-obuvl">kvinners air jordan retro 3 gull rosa</a> <a href="http://www.cooterscamera.com/nike-huarache-utility-gr%C3%A5-lilla-skoj">nike huarache utility gr氓 lilla</a> <a href="http://www.marjalfun.com/maschio-asics-asics-gel-kayano-20-argento-gituttio-scarpel">maschio asics asics gel kayano 20 argento gituttio</a> <a href="http://www.alecsblog.com/nike-flyknit-lunar-3-pink-black-shoesj">nike flyknit lunar 3 pink black</a> <a href="http://www.troudumonde.com/nike-shox-avenue-lyser%C3%B8d-hvid-skok">nike shox avenue lyser酶d hvid</a> <a href="http://www.smilesdrdavid.com/nike-air-max-tn-himmelen-bl%C3%A5-gul-obuvp">nike air max tn himmelen bl氓 gul</a>
intellalegal http://www.intellalegal.com/
pearsonchool
 pearsonchool 2019-02-07 07:54回复
#77
<a href="http://www.tkbelazig.com/mujeres-nike-zoom-pegasus-32-p%C3%BArpura-rosado-zapatosk">mujeres nike zoom pegasus 32 p煤rpura rosado</a> <a href="http://www.swiftgrocer.com/mens-air-jordan-5-green-shoesi">mens air jordan 5 green</a> <a href="http://www.warrnamboolag.com/adidas-rose-rosa-schuhei">adidas rose rosa</a> <a href="http://www.paineesq.com/air-jordan-super-fly-p%C3%BArpura-rosado-zapatosp">air jordan super fly p煤rpura rosado</a> <a href="http://www.gemmatyndall.com/kvinders-nike-shox-turbo-21-appelsin-gr%C3%A5-skoi">kvinders nike shox turbo 21 appelsin gr氓</a> <a href="http://www.cestreaming.com/nike-kobe-7-svart-hvit-obuvq">nike kobe 7 svart hvit</a>
pearsonchool http://www.pearsonchool.com/
alexisellen
 alexisellen 2019-02-06 14:05回复
#76
<a href="http://www.solidgoldpay.com/nike-lebron-14-prm-rot-carpet-games-kurpesf">nike lebron 14 prm rot carpet games</a> <a href="http://www.willholtmusic.com/air-jordan-10-hombresta-verde-for-venta-schuheg">air jordan 10 hombresta verde for venta</a> <a href="http://www.allefuerbeate.com/air-max-penny-1-university-rosso-schuheb">air max penny 1 university rosso</a> <a href="http://www.bandbfalmouth.com/nike-air-max-2017-l%C3%A6r-gull-lilla-chaussurese">nike air max 2017 l忙r gull lilla</a> <a href="http://www.cartonpat.com/nike-flyknit-lunar-3-m%C3%A6nd-butyg">nike flyknit lunar 3 m忙nd</a> <a href="http://www.checkupmental.com/nike-air-max-87-sb-rot-scarpea">nike air max 87 sb rot</a>
alexisellen http://www.alexisellen.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸