모바일로 접속시 /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개 / 댓글 2개
채택된 답변
+20 포인트
Copy
<?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; }}?>
답변에 대한 댓글 1개
Copy
<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>
답변에 대한 댓글 1개
비비비비빕
2016-09-05 (월) 16:47:10
죄송합니다 로케이션 말고요...
그누보드에서 모바일 접속시 index.php가 실행되는걸로 알고있는데
index.php로 이동도안되고 index.html 로도 이동이안됩니다
그누보드에서 모바일 접속시 index.php가 실행되는걸로 알고있는데
index.php로 이동도안되고 index.html 로도 이동이안됩니다
답변을 작성하려면 로그인이 필요합니다.