Codeigniter - 如何打开特定页面取决于屏幕大小

时间:2017-08-02 15:22:38

标签: php codeigniter

我在控制器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); 
    }
}
}

如何根据屏幕尺寸打开特定页面??

0 个答案:

没有答案