MICUU
心情
所有
图集
登录
搜索
原创
PHP_composer包mobiledetect/mobiledetectlib检测设备是否手机端文档
米醋儿
发布于:2021-02-26
PHP检测是不是手机端,如果是则自动跳转到手机网址,否则访问pc网页!这是一个非常普遍的工能,但是要我们自己手写检测设备的话可能Kelvin没有那么全面,现在分享一款手机端设备检测工具PHP版本的,可以迁移到任何框架下使用。 >  包名:`composer包mobiledetect/mobiledetectlib` 下载地址:https://packagist.org/packages/mobiledetect/mobiledetectlib 更多composer包推荐:http://micuer.com/new/333.html ## 使用示例 ``` require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect; $detect->isMobile(); 手机 $detect->isTablet(); 平板电脑 $detect->isIphone(); 苹果 $detect->isSamsung();三星 // Alternative to magic methods. $detect->is('iphone'); // Find the version of component. $detect->version('Android'); ``` 更多实例请访问官方代码:https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples ## 使用方法[支持函数] | 方法名 | | ------------ | ------------ | |**基础用法 ** | |isMobile() bool(false) 手机 | |isTablet() bool(false) 平板 | |**自定义方法** | |isiPhone() bool(false) | |isBlackBerry() bool(false) | |isPixel() bool(false) | |isHTC() bool(false) | |isNexus() bool(false) | |isDell() bool(false) | |isMotorola() bool(false) | |isSamsung() bool(false) | |isLG() bool(false) | |isSony() bool(false) | |isAsus() bool(false) | |isXiaomi() bool(false) | |isNokiaLumia() bool(false) | |isMicromax() bool(false) | |isPalm() bool(false) | |isVertu() bool(false) | |isPantech() bool(false) | |isFly() bool(false) | |isWiko() bool(false) | |isiMobile() bool(false) | |isSimValley() bool(false) | |isWolfgang() bool(false) | |isAlcatel() bool(false) | |isNintendo() bool(false) | |isAmoi() bool(false) | |isINQ() bool(false) | |isOnePlus() bool(false) | |isGenericPhone() bool(false) | |isiPad() bool(false) | |isNexusTablet() bool(false) | |isGoogleTablet() bool(false) | |isSamsungTablet() bool(false) | |isKindle() bool(false) | |isSurfaceTablet() bool(false) | |isHPTablet() bool(false) | |isAsusTablet() bool(false) | |isBlackBerryTablet() bool(false) | |isHTCtablet() bool(false) | |isMotorolaTablet() bool(false) | |isNookTablet() bool(false) | |isAcerTablet() bool(false) | |isToshibaTablet() bool(false) | |isLGTablet() bool(false) | |isFujitsuTablet() bool(false) | |isPrestigioTablet() bool(false) | |isLenovoTablet() bool(false) | |isDellTablet() bool(false) | |isYarvikTablet() bool(false) | |isMedionTablet() bool(false) | |isArnovaTablet() bool(false) | |isIntensoTablet() bool(false) | |isIRUTablet() bool(false) | |isMegafonTablet() bool(false) | |isEbodaTablet() bool(false) | |isAllViewTablet() bool(false) | |isArchosTablet() bool(false) | |isAinolTablet() bool(false) | |isNokiaLumiaTablet() bool(false) | |isSonyTablet() bool(false) | |isPhilipsTablet() bool(false) | |isCubeTablet() bool(false) | |isCobyTablet() bool(false) | |isMIDTablet() bool(false) | |isMSITablet() bool(false) | |isSMiTTablet() bool(false) | |isRockChipTablet() bool(false) | |isFlyTablet() bool(false) | |isbqTablet() bool(false) | |isHuaweiTablet() bool(false) | |isNecTablet() bool(false) | |isPantechTablet() bool(false) | |isBronchoTablet() bool(false) | |isVersusTablet() bool(false) | |isZyncTablet() bool(false) | |isPositivoTablet() bool(false) | |isNabiTablet() bool(false) | |isKoboTablet() bool(false) | |isDanewTablet() bool(false) | |isTexetTablet() bool(false) | |isPlaystationTablet() bool(false) | |isTrekstorTablet() bool(false) | |isPyleAudioTablet() bool(false) | |isAdvanTablet() bool(false) | |isDanyTechTablet() bool(false) | |isGalapadTablet() bool(false) | |isMicromaxTablet() bool(false) | |isKarbonnTablet() bool(false) | |isAllFineTablet() bool(false) | |isPROSCANTablet() bool(false) | |isYONESTablet() bool(false) | |isChangJiaTablet() bool(false) | |isGUTablet() bool(false) | |isPointOfViewTablet() bool(false) | |isOvermaxTablet() bool(false) | |isHCLTablet() bool(false) | |isDPSTablet() bool(false) | |isVistureTablet() bool(false) | |isCrestaTablet() bool(false) | |isMediatekTablet() bool(false) | |isConcordeTablet() bool(false) | |isGoCleverTablet() bool(false) | |isModecomTablet() bool(false) | |isVoninoTablet() bool(false) | |isECSTablet() bool(false) | |isStorexTablet() bool(false) | |isVodafoneTablet() bool(false) | |isEssentielBTablet() bool(false) | |isRossMoorTablet() bool(false) | |isiMobileTablet() bool(false) | |isTolinoTablet() bool(false) | |isAudioSonicTablet() bool(false) | |isAMPETablet() bool(false) | |isSkkTablet() bool(false) | |isTecnoTablet() bool(false) | |isJXDTablet() bool(false) | |isiJoyTablet() bool(false) | |isFX2Tablet() bool(false) | |isXoroTablet() bool(false) | |isViewsonicTablet() bool(false) | |isVerizonTablet() bool(false) | |isOdysTablet() bool(false) | |isCaptivaTablet() bool(false) | |isIconbitTablet() bool(false) | |isTeclastTablet() bool(false) | |isOndaTablet() bool(false) | |isJaytechTablet() bool(false) | |isBlaupunktTablet() bool(false) | |isDigmaTablet() bool(false) | |isEvolioTablet() bool(false) | |isLavaTablet() bool(false) | |isAocTablet() bool(false) | |isMpmanTablet() bool(false) | |isCelkonTablet() bool(false) | |isWolderTablet() bool(false) | |isMediacomTablet() bool(false) | |isMiTablet() bool(false) | |isNibiruTablet() bool(false) | |isNexoTablet() bool(false) | |isLeaderTablet() bool(false) | |isUbislateTablet() bool(false) | |isPocketBookTablet() bool(false) | |isKocasoTablet() bool(false) | |isHisenseTablet() bool(false) | |isHudl() bool(false) | |isTelstraTablet() bool(false) | |isGenericTablet() bool(false) | |isAndroidOS() bool(false) | |isBlackBerryOS() bool(false) | |isPalmOS() bool(false) | |isSymbianOS() bool(false) | |isWindowsMobileOS() bool(false) | |isWindowsPhoneOS() bool(false) | |isiOS() bool(false) | |isiPadOS() bool(false) | |isSailfishOS() bool(false) | |isMeeGoOS() bool(false) | |isMaemoOS() bool(false) | |isJavaOS() bool(false) | |iswebOS() bool(false) | |isbadaOS() bool(false) | |isBREWOS() bool(false) | |isChrome() bool(false) | |isDolfin() bool(false) | |isOpera() bool(false) | |isSkyfire() bool(false) | |isEdge() bool(false) | |isIE() bool(false) | |isFirefox() bool(false) | |isBolt() bool(false) | |isTeaShark() bool(false) | |isBlazer() bool(false) | |isSafari() bool(false) | |isWeChat() bool(false) | |isUCBrowser() bool(false) | |isbaiduboxapp() bool(false) | |isbaidubrowser() bool(false) | |isDiigoBrowser() bool(false) | |isMercury() bool(false) | |isObigoBrowser() bool(false) | |isNetFront() bool(false) | |isGenericBrowser() bool(false) | |isPaleMoon() bool(false) | |Experimental version() method | |version(Chrome) string(13) "86.0.4240.111" | |version(Safari) string(6) "537.36" | |version(Webkit) string(6) "537.36" | |version(Windows NT) string(4) "10.0" | |**其他实例 ** | |isiphone() bool(false) | |isIphone() bool(false) | |istablet() bool(false) | |isIOS() bool(false) | |isWhateverYouWant() bool(false) | |**调试** | |Matching Regex NULL | |Matching Array NUL |
注:原创不易,转载请注明出处(
https://micuu.com/new/1444.html
),本站所有资源来源于网络收集,如有侵权请联系QQ245557979进行清除。
最后修改与 2022-02-22
上一篇:
你以为你错过的都是遗憾吗 其实有可能是灾难
下一篇:
notepad++、webstorm等编辑器怎么修改多行代码
留言反馈
请先登录
问题反馈渠道,如有软件无法下载或者其他问题可反馈。【由于某种原因,目前留言不展示】
用户需要登录后才能留言反馈
立即留言
珍藏视频
10分钟高效燃脂
30天高效瘦脸操
5分钟缓解颈椎操
友人
微博
全民K歌
唱吧
今日头条
悠悠网
科技小锅盖
彼岸桌面
阮一峰
laravel社区
V2ex
掘金
更多>