0
condizionale 자동 리다이렉트 URL을 작성 중이지만 작동하지 않습니다. 이 중 아무도 작동하지, 왜다른 URL에서 자동 리디렉션하는 방법은 무엇입니까?
<script>
function mobileDevice()
{
$type = $_SERVER[‘HTTP_USER_AGENT’];
if(strpos((string)$type, “Windows Phone”) != false || strpos((string)$type, “iPhone”) != false || strpos((string)$type, “Android”) != false)
return true;
else
return false;
}
if(mobileDevice() == true)
header(‘Location: https://www.organization.org/mobile/index_mobile.htm‘);
</script>
나는 아직 발표로
<script type="text/javascript">
if (screen.width <= 414) {
document.location = "index.htm";
<script language=javascript>
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
location.replace("https://www.organization.org/mobile/index_mobile.htm");
}
</script>
}
</script>
: 나는 두 가지 방법으로 시도?
내가 함께하려고하면 :
어쨌든 작동하지 않습니다. –스크립트 블록 내에 메타 태그를 삽입 할 수 없습니다. 이것은 어떻게 작동하지 않습니다. 메타 태그는 head 태그 안에 있어야하며 실행될 코드와 함께 스크립트 태그를 추가 할 수 있지만 그 안에 자바 스크립트 만 있습니다. '
' – jmtalarn오 ... 그게 이유입니다. 정말 고맙습니다! –