广州传奇网络

地址:广州市天河区东圃大马路富华楼C座

电话:13808825895

邮箱:gz020wbs@163.com

QQ:1564443073

网址:http://www.020wbs.com/

首页 > 二次开发Ecshop二次开发 > 让ecshop搜索url链接不加密直接正常显示

二次开发Ecshop二次开发

二次开发Ecshop二次开发

让ecshop搜索url链接不加密直接正常显示

在搜索产品时候出现的地址很长,比如 

  1. search.php?encode=YTo0OntzOjg6ImNhdGVnb3J5IjtzOjE6IjAiO3M6ODoia2V5d29yZHMiO3M6MToiZCI7czoxMDoiaW1hZ2VGaWVsZCI7czowOiIiO3M6MTg6InNlYXJjaF9lbmNvZGVfdGltZ 

代码后缀直接encode,base64加密了。 如何让他正常显示不加密呢?

1. 找到search.php,注销掉18-66行

 

  1. if (empty($_GET['encode'])) 
  2.     $string = array_merge($_GET, $_POST); 
  3.     if (get_magic_quotes_gpc()) 
  4.     { 
  5.         require(dirname(__FILE__) . '/includes/lib_base.php'); 
  6.         //require(dirname(__FILE__) . '/includes/lib_common.php'); 
  7.  
  8.         $string = stripslashes_deep($string); 
  9.     } 
  10.     $string['search_encode_time'] = time(); 
  11.     $string = str_replace('+', '%2b', base64_encode(serialize($string))); 
  12.  
  13.     header("Location: search.php?encode=$string\n"); 
  14.  
  15.     exit; 
  16. else 
  17.     $string = base64_decode(trim($_GET['encode'])); 
  18.     if ($string !== false) 
  19.     { 
  20.         $string = unserialize($string); 
  21.         if ($string !== false) 
  22.         { 
  23.             /* 用户在重定向的情况下当作一次访问 */ 
  24.             if (!empty($string['search_encode_time'])) 
  25.             { 
  26.                 if (time() > $string['search_encode_time'] + 2) 
  27.                 { 
  28.                     define('INGORE_VISIT_STATS', true); 
  29.                 } 
  30.             } 
  31.             else 
  32.             { 
  33.                 define('INGORE_VISIT_STATS', true); 
  34.             } 
  35.         } 
  36.         else 
  37.         { 
  38.             $string = array(); 
  39.         } 
  40.     } 
  41.     else 
  42.     { 
  43.         $string = array(); 
  44.     } 

 2.继续注释掉69行。

 

  1. $_REQUEST = array_merge($_REQUEST, addslashes_deep($string));