小编use*_*111的帖子

检测显示分辨率

我需要人们使用PHP检测设备显示分辨率的帮助.

切换界面时我的代码出现问题我有以下代码:

 $_page="home";
 if(get('page'))
    $_page=strtolower(get('page'));
 // Check if larger than 800px screen will show this code.
 $_pagePath='Includes/desktop/'.$_page.'_left.php';
 // Check if the screen is smaller than 800px will display this code.
 $_pagePath='Includes/mobile/'.$_page.'_left.php';  
 if(file_exists($_pagePath))
            include $_pagePath;
 else
    echo 'File '.$_pagePath.' not found';
Run Code Online (Sandbox Code Playgroud)

请帮我完成这段代码.

php mobile device-detection

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

device-detection ×1

mobile ×1

php ×1