I need the help from people detecting the display resolution of a device using PHP.
My code is in trouble when switching interface I have the following code:
$_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';
Please help me finish this code.
The resolution displayed on the mobile device I want to have the size below 800px. It will display the UI directory: Incluce/Mobile
And the resolution on the computer I want to have on 801px size. It will display the UI directory: Incluce/Desktop
Thank. – user3463111 Oct 01 '14 at 09:44