HTML缓存 php if语句里面有html

问题描述

我在 PHP 中做了一个 if 语句,在 Internet Explorer 11 中显示一个弹出窗口。

我的问题是将 html 兑现(如 Opcache 或 Nginx fastcgi 缓存)设置为这样,如果它兑现,此弹出窗口会显示在每个浏览器中。或者 if 语句会继续工作。

if (preg_match('~MSIE|Internet Explorer~i',$ua) || (strpos($ua,'Trident/7.0') !== false && strpos($ua,'rv:11.0') !== false)) { 
?>
   <div class="ie-overlay">
        <div class="ie-popup">
        <h2>Your browser is out of date</h2>
            <span>
                Switch to another browser like chrome of firefox.
            </span>
        </div>
   </div>
<?PHP
else {}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...