Error message

  • Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in include_once() (line 1374 of /var/www/html/aps/includes/bootstrap.inc).
  • Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in include_once() (line 1374 of /var/www/html/aps/includes/bootstrap.inc).
  • Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in include_once() (line 1374 of /var/www/html/aps/includes/bootstrap.inc).

[PHP]如何判斷 browser 版本

首先需下載 php_browscap.ini (browscap.ini)

可以至 http://browscap.org/ 下載最新版

下載後至 php.ini 修改browscap參數至 php_browscap.ini  路徑

[browscap]
browscap=/etc/php.d/php_browscap.ini

重新啟動 web server 

就可以利用 

 get_browser(); 來取得

範列如下

 <?php

    $browser = get_browser();

     print_r($browser);

 ?>