使用Zend Framework的WURFL忽略了缓存目录配置
||
我正在遵循有关使用Zend Framework设置WURFL的教程,以轻松进行移动浏览器检测。
http://framework.zend.com/manual/zh/zend.http.user-agent.html#zend.http.user-agent.quick-start
我已经将其设置为可以检测到桌面浏览器并为我提供该浏览器的所有详细信息和功能的地步,但是当我尝试使用iPhone(移动浏览器)访问该网站时,尝试编写时会引发错误到缓存目录。
这是我在错误日志中看到的内容:
2011-06-08T22:32:34-07:00 ERR (3): The file cache directory does not exist and could not be created. Please make sure the cache directory is writeable: /var/tmp
但是,在我的/application/configs/wurfl-config.php的配置中,我已将缓存目录设置为以下内容:
<?php
$resourcesDir = dirname(__FILE__) . \'/../../data/wurfl/\';
$wurfl[\'main-file\'] = $resourcesDir . \'wurfl-2.0.27.zip\';
$wurfl[\'patches\'] = array($resourcesDir . \'web_browsers_patch.xml\');
$persistence[\'provider\'] = \'file\';
$persistence[\'dir\'] = $resourcesDir . \'/cache/\';
$cache[\'provider\'] = null;
$configuration[\'wurfl\'] = $wurfl;
$configuration[\'persistence\'] = $persistence;
$configuration[\'cache\'] = $cache;
我还确保它可以被服务器写入,但是wurfl似乎认为我的缓存目录仍然是/ var / tmp
如何让wurfl观察我的缓存目录设置?
注意:本教程以wurfl-1.1为例,我只能在sourceforge上找到wurfl-1.3。这可能是一个问题。
注意:我的application.ini文件中包含以下几行:
; WURFL
resources.useragent.wurflapi.wurfl_api_version = \"1.1\"
resources.useragent.wurflapi.wurfl_lib_dir = APPLICATION_PATH \"/../library/wurfl-php-1.3.0/WURFL/\"
resources.useragent.wurflapi.wurfl_config_file = APPLICATION_PATH \"/configs/wurfl-config.php\"
没有找到相关结果
已邀请:
6 个回复
墩瓣茅械
因此,在Zend \的application.ini中,我对WURFL的完整配置如下所示:
也许是框架中有关如何读取正在传递的配置数组的错误?
你换
将其转换为:
驮帽俺篮号
攫怂绵十
锯康
功飘