Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not rendering a PHP page to IE

Tags:

browser

php

I have a PHP page which breaks down in IE 6 and 7, hence I want users to not use IE. Warnings and notices will be definitely ignored by them. So as a solution, can I just stop rendering the page if the request come from IE and just display a line that IE is not supported?

I am new to php and hence the question. IE SUCKS!

like image 706
user1263746 Avatar asked Nov 30 '25 05:11

user1263746


1 Answers

Use user-agent checking:

if(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) {
    echo 'IE6'
};

if(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) {
    echo 'IE7';
};
like image 189
Vlad Volkov Avatar answered Dec 01 '25 18:12

Vlad Volkov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!