广州传奇网络

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

电话:13808825895

邮箱:gz020wbs@163.com

QQ:1564443073

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

首页 > 二次开发Ecshop二次开发 > ECSHOP搜索产品url网址search.php地址很长处理方法

二次开发Ecshop二次开发

二次开发Ecshop二次开发

ECSHOP搜索产品url网址search.php地址很长处理方法

 ecshop,在搜索产品时候出现的地址很长,比如 search.php? encode = YTo0OntzOjg6ImNhdGVnb3J5
IjtzOjE6IjAiO3M6ODoia2V5d29yZHMiO3M6MToiZCI7czoxMDoiaW1hZ2VGaWVsZCI7czowOiIiO3M6MTg6InNlYXJjaF9lbmNvZGVfdGltZ 代码后缀直
大家使用ecshop,在搜索产品时候出现的地址很长,比如
search.php?encode=YTo0OntzOjg6ImNhdGVnb3J5IjtzOjE6IjAiO3M6ODoia2V5d29yZHMiO3M6MToiZCI7czoxMDoiaW1hZ2VGaWVsZCI7czowOiIiO3M6MTg6InNlYXJjaF9lbmNvZGVfdGltZ
代码后缀直接encode,base64加密了。 如何让他正常显示不加密呢? 提供解决方法:
1. 找到search.php,注销掉18-66行

if (empty($_GET['encode']))
{
$string = array_merge($_GET, $_POST);
if (get_magic_quotes_gpc())
{
require(dirname(__FILE__) . '/includes/lib_base.php');
//require(dirname(__FILE__) . '/includes/lib_common.php');

$string = stripslashes_deep($string);
}
$string['search_encode_time'] = time();
$string = str_replace('+', '+', base64_encode(serialize($string)));

header("Location: search.php?encode=$string\n");

exit;
}
else
{
$string = base64_decode(trim($_GET['encode']));
if ($string !== false)
{
$string = unserialize($string);
if ($string !== false)
{

if (!empty($string['search_encode_time']))
{
if (time() > $string['search_encode_time'] + 2)
{
define('INGORE_VISIT_STATS', true);
}
}
else
{
define('INGORE_VISIT_STATS', true);
}
}
else
{
$string = array();
}
}
else
{
$string = array();
}
}
2.继续注释掉69行。

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