gpt4 book ai didi

php - 从 PHP 5.6 升级到 7.4

转载 作者:行者123 更新时间:2023-12-03 23:06:36 25 4
gpt4 key购买 nike

<分区>

这里是新手。我正在从 PHP 5.6 升级到 7.6

在我的登录页面上,无法登录,出现以下错误:

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/domain/library/config.php on line 49

这是 config.php 文件的代码:

        <?php
ini_set('display_errors', 'On');
//ob_start("ob_gzhandler");
error_reporting(E_ALL);

// start the session
session_start();
$sid = session_id();

// database connection config
$servername = 'xxx';
$username = 'xxx';
$password = 'xxx';
$dbName = 'xxx';


require_once 'database.php';
require_once 'common.php';

// get the shop configuration ( name, addres, etc ), all page need it
$getSiteConfig = getSiteConfig();

// setting up the web root and server root for
// this shopping cart application
$thisFile = str_replace('\\', '/', __FILE__);
$docRoot = $_SERVER['DOCUMENT_ROOT'];

$webRoot = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
$srvRoot = str_replace('library/config.php', '', $thisFile);

define('WEB_ROOT', $webRoot);
define('SRV_ROOT', $srvRoot);


define ( "REDIRECT_AFTER_CONFIRMATION", TRUE );
define ( "ADMIN_EMAIL", $getSiteConfig['siteemail'] );
define ( "DOMAIN_NAME", $getSiteConfig['sitename'] );
define ( "USE_SMTP", FALSE );
define ( "SMTP_PORT", "" );
define ( "SMTP_HOST", "" );
define ( "SMTP_USER", "" );
define ( "SMTP_PASS", "" );
define ( "MAIL_IS_HTML", TRUE );
/**
* website title.
*/


if (!get_magic_quotes_gpc()) {
if (isset($_POST)) {
foreach ($_POST as $key => $value) {
$_POST[$key] = trim(addslashes($value));
}
}

if (isset($_GET)) {
foreach ($_GET as $key => $value) {
$_GET[$key] = trim(addslashes($value));
}
}
}

removeInactiveUsers();

?>

当我删除已弃用的 get_magic_quotes_gpc() 并转到登录页面时,它只是一片空白。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com