-1
我想在我的php項目中使用phpbrowscap。'path/to/the/cache/dir'是什麼意思?
爲了創建這個類的一個新對象,我用這個代碼:
/phpbrowscap follows the PSR-0 standard, so just require the composer autoload
require 'vendor/autoload.php';
// The Browscap class is in the phpbrowscap namespace, so import it
use phpbrowscap\Browscap;
// Create a new Browscap object (loads or creates the cache)
$bc = new Browscap('path/to/the/cache/dir');
// Get information about the current browser's user agent
$current_browser = $bc->getBrowser();
但我不明白的地方的緩存目錄(「路徑/到/的/緩存/ DIR」)來代替它是。