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>
:私は2つの方法で試してみましたか?
私がしようとした場合:
とにかく動作しません –スクリプトブロック内にメタタグを挿入することはできません。これはどのように動作するのではありません。メタタグはheadタグの内側にある必要があります。実行されるコードでスクリプトタグを追加できますが、その内部にはJavaScriptだけが含まれています。 '
「 – jmtalarnああ...だからこそ。どうもありがとうございます! –