Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php中的存储平台_Php_Function_Platform - Fatal编程技术网

php中的存储平台

php中的存储平台,php,function,platform,Php,Function,Platform,我创建这个函数是希望能够检索用于进行web调查的平台。然而,它只是返回桌面的一切!(甚至iPhone等)。有人能帮忙吗?您可以使用简单的脚本-。它很容易使用: <?php require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect; // Any mobile device (phones or tablets). if ( $detect->isMobile() ) { } 那么移动设备信息将存储在$detect

我创建这个函数是希望能够检索用于进行web调查的平台。然而,它只是返回桌面的一切!(甚至iPhone等)。有人能帮忙吗?

您可以使用简单的脚本-。它很容易使用:

<?php
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;

// Any mobile device (phones or tablets).
if ( $detect->isMobile() ) {

}

那么移动设备信息将存储在$detect?是的。我认为$detect是关于用户代理和HTTP头的信息。此脚本使用正则表达式正确查找设备。为什么您一直试图编辑问题的内容??在回答问题之前,您可以将其删除。回答后,它属于社区,作为原始海报不会让你有特权将其变成无效问题,并且让答案没有上下文。