去掉ecshop搜索url链接加密正常直接显示
日期:2020-12-08
使用ecshop在搜索产品时候默认出现的地址很长,比如
1. 打开search.php文件,找到如下代码删除掉
https://www.ecshop.cx/search.php?encode=YTo0OntzOjg6ImNhdGVnb3J5IjtzOjE6IjAiO3M6ODoia2V5d29yZHMiO3M6NjoiZWNzaG9wIjtzOjEwOiJpbWFnZUZpZWxkIjtzOjA6IiI7czoxODoic2VhcmNoX2VuY29kZV90aW1lIjtpOjE2MDc0MzcwOTI7fQ==地址encode后面代码直接base64加密了。如何让他正常显示不加密呢?ECSHOP插件网提供解决方法:
1. 打开search.php文件,找到如下代码删除掉
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.继续找到如下代码删除掉。
$_REQUEST = array_merge($_REQUEST, addslashes_deep($string));
本文原创地址:https://ecshopok.com/article-697.html
版权所有 © 转载时必须以链接形式注明出处!
觉得本文对您有用,想收藏下来!方法很简单:请点击-〉
我们一直坚持白天工作、晚上熬夜更新资源,付出了巨大的精力和时间,其中的辛酸难以言述。





暂无评论,来发表一个吧