欢迎光临
我们一直在努力

让Ecshop搜索结果的url不加密 正常显示

大家使用ecshop,在搜索产品时候出现的地址很长,比如
search.php?encode=YTo0OntzOjg6ImNhdGVnb3J5IjtzOjE6IjAiO3M6ODoia2V5d29yZHMiO3M6MToiZCI7czoxMDoiaW1hZ2VGaWVsZCI7czowOiIiO3M6MTg6InNlYXJjaF9lbmNvZGVfdGltZ

代码后缀直接encode,base64加密了。 如何让他正常显示不加密呢? 最模板提供解决方法:

1. 找到search.php,注销掉25-72行

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(‘+’, ‘%2b’, 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.继续注释掉77行。

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

赞(0) 打赏
未经允许不得转载:程序开发爱好者 » 让Ecshop搜索结果的url不加密 正常显示
分享到: 更多 (0)

网站设计及开发、微应用及微网站开发、微信公众平台开发、 HTML5手机网站开发、网络整合营销、APP开发、软件开发及企业电商服务

联系我们