|  | 
 
 发表于 2017-1-13 11:57:57
|
显示全部楼层 
| 本帖最后由 ambtion 于 2017-1-13 12:49 编辑 
 看了下 实现url正常跳转  需要做如下修改 实测ok
 
 # 替换缓存文件中的localhost
 sed -i "s/localhost/www.xxx.com/g" www/aci/application/cache/cache_module_menu_all
 
 # 在 aci/system/libraries/Cache/drivers/Cache_file.php 文件中更新_get()方法
 # 替换localhost为www.xxx.com导致了反序列化的时候判断字符长度出现了问题,所以需要使用正则表达式将序列化的数组中的表示字符长度的值重新计算一遍# 苦脸处是:(
 protected function _get($id)        {
 if ( ! is_file($this->_cache_path.$id))
 {
 return FALSE;
 }
 $out = preg_replace('!s
  \d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", file_get_contents($this->_cache_path.$id)); $data = unserialize($out);
 //var_dump($data);exit;
 if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
 {
 unlink($this->_cache_path.$id);
 return FALSE;
 }
 
 return $data;
 }
 
 
 
 
 
 
 
 | 
 |