我在控制器Codeigniter中有代码:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Home extends CI_Controller {
public function __construct()
{
parent:: __construct();
$this->load->model('berita');
}
public function index()
{
$data['newsone'] = $this->berita->get_one_top_data();
if(width.screen > 1000px){ // i need the true code in here
$this->load->view('home_view_1',$data);
}
else{
$this->load->view('home_view_2',$data);
}
}
}
如何根据屏幕尺寸打开特定页面??