好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 網站建設 > 建站知識 > DEDECMS后臺登錄空白解決辦法

DEDECMS后臺登錄空白解決辦法

POST TIME:2020-04-13 22:42

解決方法:

打開 /userlogin.class.php 文件,在當前文件搜索keepUser(),然后把這個下面的@session_register();給注釋掉就行了!

當然要不影響,可以改成

代碼如下  
if (!isset($_SESSION[$this->keepUserTypeTag]))

修改完的函數:

代碼如下  

function keepUser()
{
if($this->userID != '' && $this->userType != '')
{
global $admincachefile,$adminstyle;
if(empty($adminstyle)) $adminstyle = 'dedecms';

if (!isset($_SESSION[$this->keepUserIDTag]))
//@session_register($this->keepUserIDTag);
$_SESSION[$this->keepUserIDTag] = $this->userID;
if (!isset($_SESSION[$this->keepUserTypeTag]))
//@session_register($this->keepUserTypeTag);
$_SESSION[$this->keepUserTypeTag] = $this->userType;
if (!isset($_SESSION[$this->keepUserChannelTag]))
//@session_register($this->keepUserChannelTag);
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
if (!isset($_SESSION[$this->keepUserNameTag]))
//@session_register($this->keepUserNameTag);
$_SESSION[$this->keepUserNameTag] = $this->userName;
if (!isset($_SESSION[$this->keepUserPurviewTag]))
//@session_register($this->keepUserPurviewTag);
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
if (!isset($_SESSION[$this->keepAdminStyleTag]))
//@session_register($this->keepAdminStyleTag);
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
PutCookie('DedeUserID', $this->userID, 3600 * 24, '/');
PutCookie('DedeLoginTime', time(), 3600 * 24, '/');

$this->ReWriteAdminChannel();

return 1;
}
else
{
return -1;
}

我的問題解決了,但有些朋友并不是因為這個問題導致的。

DedeCMS 5.3/5.5/5.6等版本的UTF版本會經常遇到一個問題,就是后臺登錄會什么都不顯示,空白一片


般這個問題都是由于使用了“記事本”而沒有使用專業的文本編輯軟件來編輯DedeCMS的文件造成的,一般是由于修改了以下幾個文件:

include/common.inc.php
data/common.inc.php
dede/config.php

如果你使用了“記事本”之類的軟件修改這些文件,修改后都會在文件中加上BOM,造成程序不能正常運行。

可以使用下面的代碼來清除文件中的BOM,解決DEDECMS后臺列表和登錄空白的問題:

Cs_BomKill.php代碼:

代碼如下  

<?php

//此文件用于快速測試UTF8編碼的文件是不是加了BOM,并可自動移除
//By Bob Shen
$basedir="."; //修改此行為需要檢測的目錄,點表示當前目錄
$auto=1; //是否自動移除發現的BOM信息。1為是,0為否。

//以下不用改動

if ($dh = ($basedir)) {
while (($file = readdir($dh)) !== false) {
if ($file!='.' && $file!='..' && !is_dir($basedir."/".$file)) echo "filename: $file ".checkBOM("$basedir/$file")." <br>";
}
closedir($dh);
}

function checkBOM ($filename) {
global $auto;
$contents=file_get_contents($filename);
$charset[1]=($contents, 0, 1);
$charset[2]=substr($contents, 1, 1);
$charset[3]=substr($contents, 2, 1);
if (ord($charset[1])==239 && ord($charset[2])==187 && ord($charset[3])==191) {
if ($auto==1) {
$rest=substr($contents, 3);
rewrite ($filename, $rest);
return ("<font color=red>BOM found, automatically removed.</font>");
} else {
return ("<font color=red>BOM found.</font>");
}
}
else return ("BOM Not Found.");
}

function rewrite ($filename, $data) {
$filenum=($filename,"w");
flock($filenum,LOCK_EX);
fwrite($filenum,$data);
fclose($filenum);
}
//結束
?>

如果上面辦法還是無法解決你的問題我們可按下面方法來排查

找到:include/common.inc.php文件,打開,查找程序代碼:

代碼如下  

  //error_reporting(E_ALL);

  error_reporting(E_ALL || ~E_NOTICE);

替換為:

  error_reporting(E_ALL);

  //error_reporting(E_ALL || ~E_NOTICE);

這一步很重要,因為它會告訴你為什么變成空白的提示信息,這樣登錄后面就會看到錯誤提示了。




收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266