dpbv85276 2013-04-25 19:04
浏览 53

如何专门为Safari调用html

I am using Wordpress and my index page has responsive html on it that does not agree with safari however I created html that will work with Safari is there a php if statement that I can use to call that html ?

I used a plugin for this in Wordpress but the plugin does not work when its activated "Source Redirect Site".

Regular html - "173.83.251.7/~grebesba/" Safari Specific 173.83.251.7/~grebesba/5453-2/

Im looking for a php code that would be

"* php> ..... the regular code

if else? the safari specific code

any help please?

  • 写回答

2条回答 默认 最新

  • doufuxing8562 2013-04-25 19:12
    关注

    You can check the user agent:

    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    if( strpos( $user_agent, 'Safari' ) !== false ){
        // do Safari stuff
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable