[問題] php帳號密碼無法登入後端管理介面問題
我是改別人的程式 但是我只有網站程式沒有資料庫資料
所以我重建資料庫TABLE在我的MYSQL裡面
但是我發現 我用前人設定的帳號密碼無法登入後端管理介面
這是因為 程式設定的帳號密碼無法跟我重建的資料庫做驗證 才無法登入
還是純粹只是我帳號密碼錯誤跟資料庫無關
因為這個網站程式密碼有做加密程序 我也不知道要改哪裡的程式
才有辦法登入 請各位大大幫個忙 謝謝!!
-----------------------------------------------------------
password.php
<?
// A function that accepts a parameter to specify a length, and then returns
// a random password with characters and letters
function random_chr($length = 8, $charcase = 'all') {
// Declare a blank string to start from
$pass = '';
switch ($charcase)
{
case 'num':
$case = 0;
break;
case 'upper':
$case = 1;
break;
case 'lower':
$case = 2;
break;
}
// Now loop for as many times as the length
for ($i = 0; $i < $length; $i++) {
// For this character, first give an equal chance of upper,lower,num
if ($charcase == 'all')
$case = rand(0,2);
switch ($case) {
case 0:
// Generate a Number from 0 to 9
$pass .= rand(0,9);
break;
case 1:
// Generate a letter from A to Z via ascii values 65 to 90
$pass .= chr(rand(65,90));
break;
default:
// Instead use a letter from a to z, via ascii 97 to 122
$pass .= chr(rand(97,122));
}
}
// Return that password!
return $pass;
}
require_once('configuration.php');
$iwebConf_encrypt_1 = 'root';
$iwebConf_encrypt_2 = 'root';
$password = random_chr(6, 'lower');
echo '亂數產生的密碼:'.$password.'<br>';
echo md5($iwebConf_encrypt_1.$password.$iwebConf_encrypt_2);
?>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.229.176.227
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):