모바일 index 열기

모바일 index 열기

QA

모바일 index 열기

본문

모바일로 접속시 /mobile/index.html

이 실행되게 하고싶습니다. 아무리 찾아봐도 안되네요...!

[로케이션방법 말고 그누보드에서 제공하는 모바일로 이동하는방법으로요]

 

현재 include 폴더를 따로만들어 header.html 을 사용중입니다

 

헤더상단엔

 

<?

include_once('./_common.php');

include_once('../common.php');

 

include_once(G5_LIB_PATH.'/latest.lib.php');

include_once(G5_LIB_PATH.'/outlogin.lib.php');

include_once(G5_LIB_PATH.'/poll.lib.php');

include_once(G5_LIB_PATH.'/visit.lib.php');

include_once(G5_LIB_PATH.'/connect.lib.php');

include_once(G5_LIB_PATH.'/popular.lib.php');

 

?>

 

지금 이렇게 적혀있습니다.

이 질문에 댓글 쓰기 :

답변 2


<?php
 $arr_browser = array ("iPhone","iPod","IEMobile","Mobile","lgtelecom","PPC");
for($indexi = 0 ; $indexi < count($arr_browser) ; $indexi++) {
 if(strpos($_SERVER['HTTP_USER_AGENT'],$arr_browser[$indexi]) == true){
   header("Location: http://이동할주소");
   exit;
 }
}
?> 

<script type="text/javascript" language="JavaScript">
           var mobileKeyWords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 
					'Windows CE', 'Windows CE;', 'LG', 'SAMSUNG', 
					'MOT', 'SonyEricsson', 'Mobile', 'Symbian', 
					'Opera Mobi', 'Opera Mini', 'IEmobile');
           for (var word in mobileKeyWords){
               if (navigator.userAgent.match(mobileKeyWords[word]) != null){
                         window.location.href = "이동할 주소";
                   break;
                     }
           }
</script>
답변을 작성하시기 전에 로그인 해주세요.
전체 123,736 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT