Lida 2664 vezes
if(preg_match('/MSIE [6-7]/', $_SERVER['HTTP_USER_AGENT'])) echo "IE";
ali é no IE6 ou 7 apenas, queres em todos?
em HTML:<!--[if lt IE 7]><div>ie6</div><![endif]--><!--[if IE 7]><div>ie7</div><![endif]--><!--[if IE]><div>qualquer IE</div><![endif]-->cumps
mete aqui como estás a por, eu testei com os 3 e funciona bem, por isso estás a fazer algo mal, será que te estás a esquecer de por parêntesis?
<?phpif(preg_match('/MSIE [6-7]/', $_SERVER['HTTP_USER_AGENT'])) echo "<script language=\"JavaScript\">alert('ACTUALIZE O SEU BROWSER');</script>";?>
EDITADO: Tonebiclas, isso não funciona para o IE6. E não percebo como há gente a usar o IE6! Nem dá para usar o Google!
<!--[if IE 6]> MUDA-ME ESSA M###A DE BROWSER<![endif]-->
WordPress
Conversa Geral
Hosting