Configuration of get_browser()
このページは英語でのみ提供されています。
<?php use phpbrowscap\Browscap; /** * PHP By Example * * @copyright 2014 Michel Corne * @license http://www.opensource.org/licenses/gpl-3.0.html GNU GPL v3 */
function pre_exec_function() { $cache_dir = $this->application_path . '/data/browscap';
if (! file_exists($cache_dir) and ! @mkdir($cache_dir)) { throw new Exception('Cannot create cache directory'); }
date_default_timezone_set('UTC'); // prevents the no time zone notice set_time_limit(10 * 60); // increases the exec time for a slow download $this->object = new Browscap($cache_dir); } }