广州传奇网络

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

 2.继续注释掉69行。

 

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