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、后臺重新注冊
以上就是本文章的內容,希望對大家有所幫助。
新聞熱點
疑難解答