好!欢迎访问迷津渡口 现在时间是: 天气 °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
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
lolalolincoln
 lolalolincoln 约 10 小时前回复
#186
<a href="http://www.goodmedusa.com/nike-roshe-run-baskets-noir-chaussuresh">nike roshe run baskets noir</a> <a href="http://www.murskacorp.com/herren-salomon-xt-wings-3-lila-blau-schuheh">herren salomon xt wings 3 lila blau</a> <a href="http://www.prajansim.com/under-armour-curry-2-low-white-shoesk">under armour curry 2 low white</a> <a href="http://www.pokersurga.com/kvinders-nike-air-max-invigor-print-bl%C3%A5-skoj">kvinders nike air max invigor print bl氓</a> <a href="http://www.arkmmj.com/adidas-superstar-wei%C3%9F-gold-dam%C3%A4nner-schuheh">adidas superstar wei脽 gold dam盲nner</a> <a href="http://www.butterbroad.com/air-jordan-low-future-black-red-shoesk">air jordan low future black red</a>
lolalolincoln http://www.lolalolincoln.com/
briteideaenergy
 briteideaenergy 2019-04-24 18:15回复
#185
<a href="http://www.arsindustrialis.net/adidas-rose-7-rouge-marron-schuhea">adidas rose 7 rouge marron</a> <a href="http://www.avscience.net/salomon-speedcross-3-sort-sort-s%C3%B8lv-metal-roofing-butye">salomon speedcross 3 sort sort s酶lv metal roofing</a> <a href="http://www.babyblend.net/air-jordan-5-retro-hvit-infrar%C3%B8d-kurpesc">air jordan 5 retro hvit infrar酶d</a> <a href="http://www.bancoideas.net/femmes-reebok-zig-sonic-caf%C3%A9-butya">femmes reebok zig sonic caf茅</a> <a href="http://www.barcosquecantan.net/nike-air-max-lebron-7-deion-le-sableers-schuheg">nike air max lebron 7 deion le sableers</a> <a href="http://www.benefitsnw.net/nike-sb-dunk-low-midnight-marine-blanc-butyf">nike sb dunk low midnight marine blanc</a>
briteideaenergy http://www.briteideaenergy.net/
lemodemo
 lemodemo 2019-04-24 16:55回复
#184
<a href="http://www.seesoshow.com/air-jordan-son-of-mars-sort-gr%C3%A5-skok">air jordan son of mars sort gr氓</a> <a href="http://www.crypolio.com/nike-lunarglide-7-marinen-bl%C3%A5-obuvi">nike lunarglide 7 marinen bl氓</a> <a href="http://www.vtrvideo.com/nike-dunk-hi-ac-neutral-gris-in-gray-for-hombres-lyst-zapatosl">nike dunk hi ac neutral gris in gray for hombres lyst</a> <a href="http://www.asoseinhalb.com/ray-ban-jackie-ohh-polarised-sunglassesh">ray ban jackie ohh polarised</a> <a href="http://www.handydgh.com/custom-logo-new-era-hats-hatj">custom logo new era hats</a> <a href="http://www.blakefanz.com/nike-cortez-nm-qs-maschio-nero-bianca-scarpej">nike cortez nm qs maschio nero bianca</a>
lemodemo http://www.lemodemo.com/
flushnhunt
 flushnhunt 2019-04-24 08:16回复
#183
<a href="http://www.lagunawoodsre.com/north-face-white-resolve-jacket-womens-northfaceh">north face white resolve jacket womens</a> <a href="http://www.highbacklink.com/air-jordan-retro-3-dam%C3%A4nner-gr%C3%BCn-gelb-schuhej">air jordan retro 3 dam盲nner gr眉n gelb</a> <a href="http://www.vuurogen.com/herre-nike-air-max-tailwind-8-lyser%C3%B8d-bl%C3%A5-skoh">herre nike air max tailwind 8 lyser酶d bl氓</a> <a href="http://www.rsvppersonnel.com/adidas-superstar-rose-oranger-chaussuresh">adidas superstar rose oranger</a> <a href="http://www.shonema.com/nfl-kansas-city-chiefs-hats-hatl">nfl kansas city chiefs hats</a> <a href="http://www.enventsurvey.com/nike-air-force-1-jaune-rose-chaussuresh">nike air force 1 jaune rose</a>
flushnhunt http://www.flushnhunt.com/
ulriksdalssk
 ulriksdalssk 2019-04-22 12:11回复
#182
<a href="http://www.cmtalks.com/nike-blazer-high-i-gr%C3%A5-hvit-obuvi">nike blazer high i gr氓 hvit</a> <a href="http://www.ianbaaske.com/adidas-pr%C3%B8dator-lz-trx-fg-svart-oransje-obuvk">adidas pr酶dator lz trx fg svart oransje</a> <a href="http://www.escawinebar.com/nike-air-max-plus-tn-oransje-obuvi">nike air max plus tn oransje</a> <a href="http://www.nexcouriers.com/hombres-nike-shox-2016-oro-verde-zapatosl">hombres nike shox 2016 oro verde</a> <a href="http://www.admitoneuk.com/adidas-crazylight-triple-bianca-scarpeh">adidas crazylight triple bianca</a> <a href="http://www.rizeingilizce.com/nike-hyperdunk-orange-and-black-shoesk">nike hyperdunk orange and black</a>
ulriksdalssk http://www.ulriksdalssk.com/
bigwhiterentals
 bigwhiterentals 2019-04-22 11:29回复
#181
<a href="http://www.abetterwaymotors.net/nike-air-max-1-noir-trainers-scarpec">nike air max 1 noir trainers</a> <a href="http://www.accessabath.net/adidas-ultra-boost-olympic-guld-quarter-schuhed">adidas ultra boost olympic guld quarter</a> <a href="http://www.acostadesign.net/curry-one-svart-taxi-obuvf">curry one svart taxi</a> <a href="http://www.agentorangelegacy.net/air-huarache-negro-aloha-print-butya">air huarache negro aloha print</a> <a href="http://www.aikenfamilypharmacy.net/air-max-90-blau-uk-butya">air max 90 blau uk</a> <a href="http://www.ajimi.net/adidas-pr%C3%B8dator-lz-trx-fg-sortout-obuve">adidas pr酶dator lz trx fg sortout</a>
bigwhiterentals http://www.bigwhiterentals.net/
purple nike tanjun
 purple nike tanjun 2019-04-21 17:58回复
#180
<a href="http://www.mobiletony.com/nike-san-diego-chargers-customized-electric-blue-alternate-stitched-vapor-untouchable-limited-mens-nfl-jersey-nflt">nike san diego chargers customized electric blue alternate stitched vapor untouchable limited mens nfl jersey</a> <a href="http://www.agentmikeg.com/nfl-hayden-hurst-mens-elite-purple-jersey-81-baltimore-ravens-nike-rush-vapor-untouchable-nflu">nfl hayden hurst mens elite purple jersey 81 baltimore ravens nike rush vapor untouchable</a> <a href="http://www.ronalbags.com/flyknit-lunar-3-lyser%C3%B8d-color-kurpesc">flyknit lunar 3 lyser酶d color</a> <a href="http://www.stereokrauts.com/nike-lebron-15-purple-germany-shoeso">nike lebron 15 purple germany</a> <a href="http://www.traditionlcs.com/nike-air-force-1-flyknit-high-gr%C3%B8n-r%C3%B8d-obuvb">nike air force 1 flyknit high gr酶n r酶d</a> <a href="http://www.adanapiyasa.com/oakley-sunglasses-kalamazoo-mi-sunglassesd">oakley sunglasses kalamazoo mi</a>
purple nike tanjun http://www.rustysweb.com/purple-nike-tanjun-skot
tkbelazig
 tkbelazig 2019-04-20 04:15回复
#179
<a href="http://www.colintilley.com/air-max-1-dark-blu-scarpei">air max 1 dark blu</a> <a href="http://www.xthbgc.com/air-jordan-retro-6-femminile-oro-viola-scarpeh">air jordan retro 6 femminile oro viola</a> <a href="http://www.iberishop.com/under-armour-beanie-hat-uk-hath">under armour beanie hat uk</a> <a href="http://www.karmacanix.com/femmes-nike-air-max-tailwind-5-blanc-jaune-chaussuresh">femmes nike air max tailwind 5 blanc jaune</a> <a href="http://www.tobepartridge.com/air-jordan-retro-28-jaune-chaussuresj">air jordan retro 28 jaune</a> <a href="http://www.shopdunks.com/nike-zoom-vomero-dam%C3%A4nner-schwarz-silber-schuhej">nike zoom vomero dam盲nner schwarz silber</a>
tkbelazig http://www.tkbelazig.com/
rastadread
 rastadread 2019-04-19 00:16回复
#178
<a href="http://www.mlslawfirm.com/nike-free-run-5.0-blau-and-rosa-schuheh">nike free run 5.0 blau and rosa</a> <a href="http://www.alinakrocheva.com/nike-kobe-x-white-shoesk">nike kobe x white</a> <a href="http://www.sebdmnfv.com/alle-r%C3%B8d-adidas-soccer-cleats-skol">alle r酶d adidas soccer cleats</a> <a href="http://www.rgmclaims.com/air-huarache-nike-hvit-obuvk">air huarache nike hvit</a> <a href="http://www.karmicfix.com/nike-shox-patent-pellenike-shox-blu-and-arancia-scarpei">nike shox patent pellenike shox blu and arancia</a> <a href="http://www.marbacapital.com/converse-star-player-ev-ox-blanco-zapatosh">converse star player ev ox blanco</a>
[url=http://www.rastadread.com/]rastadread[/url]
dafuqstory
 dafuqstory 2019-04-18 06:30回复
#177
<a href="http://www.qtnkxrcr.com/nike-tanjun-boys-negro-zapatosh">nike tanjun boys negro</a> <a href="http://www.blcatering.com/k%C3%B8be-adidas-hvid-sko-skok">k酶be adidas hvid sko</a> <a href="http://www.uchbhekf.com/nike-air-force-1-kvinners-bl%C3%A5-obuvi">nike air force 1 kvinners bl氓</a> <a href="http://www.recspokane.com/nike-air-presto-negro-rojo-amarillo-zapatosl">nike air presto negro rojo amarillo</a> <a href="http://www.sjgncnph.com/ray-ban-jackie-ohh-tortoise-shell-sunglassesh">ray ban jackie ohh tortoise shell</a> <a href="http://www.loewendoors.com/san-diego-padres-new-era-mlb-heather-hype-9fifty-snapback-cap-hatj">san diego padres new era mlb heather hype 9fifty snapback cap</a>
dafuqstory http://www.dafuqstory.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸