How to set php web compatibility with different browser?
How 开发者_Python百科to set php web compatibility with different browser?
PHP is not supposed to provide you any cross browser capability. It does not depend on the browser. It is a server side technology. The HTML is rendered and styled by the developer/designer. So providing browser compatibility is the responsibility of the developer/designer.
Do nothing.
PHP has no incompatibilities with browsers.
The client side code you send to those browsers might have incompatibilities, but those should almost always be resolved at the client side level (e.g. by using better support APIs or using conditional comments)
What do you mean by web compatibility? PHP runs on all supported operating systerms and machines. PHP does not have browser compatibility issues too and it can't, it just sends output to the browsers.
If you want to decide which html/css/js code to server to the client you can take a look at the browser's user agent stored in $_SERVER['HTTP_USER_AGENT'].
moreover, get_browser() can tell you about the browser's specific capabilities.
精彩评论