나는 약간의 어려움에 직면 해 있습니다. 웹 사이트와 모바일 버전이 있습니다. 휴대 전화를 사용하는 사용자가 페이스 북과 같은 다른 사이트의 링크를 클릭하면 사용자가 선택한 링크의 콘텐츠를 표시하는 모바일 사이트로 리디렉션되기를 원합니다.휴대 전화에서 선택한 데스크톱 웹 링크를 모바일 사이트로 리디렉션
성취 :
내가 모바일 페이지에 데스크톱 버전에서 사용자를 리디렉션 할 수 있었다.
도전
내가 선택한 링크 예컨대 http://passnownow.com/inblog.php?id=3840#.UToTf3YetfU.twitter의 내용을 표시 할 수 없습니다입니다.
사용자가 게시물을 검색해야하는 모바일 사이트로만 이동합니다.
내가 무엇을 할 수 있습니까?
이것은 내 코드입니다.
<? include("overall.php");?>
<?
session_start();
require_once('mobile_device_detect.php');
$blackberrystatus = mobile_device_detect(true,true,false,true,true,true,true,false,false);
$androidstatus = mobile_device_detect(true,true,true,true,false,true,true,false,false);
$mobile = mobile_device_detect(true,true,true,true,true,true,true,false,false);
$isMobile = (bool)preg_match('#\b(ip(hone|od)|android\b.+\bmobile|opera m(ob|in)i|windows (phone|ce)|blackberry'.
'|s(ymbian|eries60|amsung)|p(alm|rofile/midp|laystation portable)|nokia|fennec|htc[\-_]'.
'|up\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\b#i', $_SERVER['HTTP_USER_AGENT']);
if($_GET["view"]=="full"){
setcookie("passnownow[client]", "pc", $time + 1209600);
$_SESSION["client"] = "pc";
}
if ($_GET["ref"]=="android" or $_GET["ref"]=="blackberry"){
setcookie("passnownow[client]", "app", $time + 1209600);
$_SESSION["client"] = "app";
header('location: mobile/new.php?id=""');
} else if ($_SESSION["client"]=="pc" or $_COOKIE['passnownow']["client"]=="pc"){
}else if ($mobile or $isMobile){
setcookie("passnownow[client]", "mobile", $time + 1209600);
$_SESSION["client"] = "mobile";
**header('location: mobile/new.php?id=""');**
}
include("overall.php");
?>
내 질문은 : 내가 선택한 링크 등을 표시 할 header('location: mobile/new.php?id=""');
을 전달할 수있는 방법을 header('location: mobile/new.php?id="234"');
header('location: mobile/new.php?id=""');
에 전달하기 위해 추가하려면 어떤 코드
$_GET['']
명령을 사용했지만 시도하지 못했습니다. 즉, 작동하지 않았습니다. header('location: mobile/new.php?id=<?php $_GET['id']; ?>');