나는 다음과 같은 몇 가지 스크립트가 있지만브라우저 너비가 PHP 인 경우 조건은 어떻게됩니까?
<?php
$width = "<script>document.write(window.outerWidth);</script>";
$width2 = (int)$width;
echo $width2;
if ($width2 < 800) { ?>
bad
<? } else { ?>
ok
<? } ?>
저를 도와주세요 작동하지 않습니다 MDC window.screen docs.
http://stackoverflow.com/questions/1504459/getting-the-screen-resolution-using-php –
PHP가 서버에서 실행되어 화면 너비를 사용할 수 없다면 자바 스크립트가 필요하거나 화면 크기, 미디어 쿼리 – atmd