728x90
public $components = array('RequestHandler'); // controller class에 member로 포함시키셈
public function beforeFilter() {
if ($this->RequestHandler->is('mobile')) {
// Execute code only if client accepts is mobile
} else {
// Execute Normal Code
}
}
출처 : http://stackoverflow.com/questions/12675306/cakephp-mobile-detection-not-working
최근댓글