1、创建 update_code.php 文件,并将以下代码粘贴到本文件:
<?php
require_once ('global.php');
require_once(R_P.'admin/cache.php');
$db_siteid = generatestr(32);
setConfig('db_siteid', $db_siteid);
$db_siteownerid = generatestr(32);
setConfig('db_siteownerid', $db_siteownerid);
$db_sitehash = '10'.SitStrCode(md5($db_siteid.$db_siteownerid),md5($db_siteownerid.$db_siteid));
setConfig('db_sitehash', $db_sitehash);
updatecache_c();
echo 'success';
function generatestr($len) {
mt_srand((double)microtime()*1000000);
$keychars = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ";
$maxlen = strlen($keychars)-1;
$str = '';
for ($i=0;$i<$len;$i++){
$str .= $keychars[mt_rand(0,$maxlen)];
}
return substr(md5($str.microtime().$GLOBALS['HTTP_HOST'].$GLOBALS['pwServer']["HTTP_USER_AGENT"].$GLOBALS['db_hash']),0,$len);
}
function SitStrCode($string,$key,$action='ENCODE'){
$string = $action == 'ENCODE' ? $string : base64_decode($string);
$len = strlen($key);
$code = '';
for($i=0; $i<strlen($string); $i++){
$k = $i % $len;
$code .= $string[$i] ^ $key[$k];
}
$code = $action == 'DECODE' ? $code : str_replace('=','',base64_encode($code));
return $code;
}
?>
2、将文件上传到根目录,运行 您的站点地址/update_code.php
3、后台重新注册
以上就是本文章的内容,希望对大家有所帮助。
新闻热点
疑难解答