对于index.php文件(以及其他相关的php文件),我需要使用screenheight(sh)和screenwidth(sw)的值。当用户输入index.php作为url然后使用window.history.pushState将刷新url(而不是页面)并显示screenheight和width。
如何以PHP GET参数的形式访问这些URL参数值...... $ _ GET [&#39; sw&#39;] / $ _GET [&#39; sh&#39;] ?? < / p>
window.history.pushState({sw:$(window).width(),sh:$(window).height()}, "Test page", "?sw=" + $(window).width() + "&sh=" + ($(window).height()));
var param = history.state; // param['sw'] / param['sh']