gpt4 book ai didi

php - fatal error : Call to undefined function getsqlvaluestring()

转载 作者:行者123 更新时间:2023-11-29 08:59:48 30 4
gpt4 key购买 nike

大家好,当我尝试使用默认的 Dreamweaver 登录模块登录时,我收到此错误,请帮助我 - 这是一个问题,我只是一名 html 设计师,试图为我的一个小网站制作一个简单的登录脚本我正在工作一个。如果您能提供帮助,那就太好了

    <?php require_once('../Connections/dsfsdfsdfd.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "access_level";
$MM_redirectLoginSuccess = "index.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_promocenter, $promocenter);

$LoginRS__query=sprintf("SELECT username, password, destination_page FROM
users WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "int"));


$LoginRS = mysql_query($LoginRS__query, $promocenter) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {

$loginStrGroup = mysql_result($LoginRS,0,'access_level');

if (PHP_VERSION >= 5.1) {session_regenerate_id(true);}
else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_promocenter, $promocenter);
$query_rs_users_login = "SELECT * FROM users";
$rs_users_login = mysql_query($query_rs_users_login, $promocenter)
or die(mysql_error());
$row_rs_users_login = mysql_fetch_assoc($rs_users_login);
$totalRows_rs_users_login = mysql_num_rows($rs_users_login);
?>

抱歉,错误是 fatal error :在第 22 行调用/u1/home/xxxxxx/public_html/newsletters/Resources/promocenter/admin/login.php 中的未定义函数 getsqlvaluestring() 这是标准的 dreamweaver cs5 代码。

连接到数据库等。我确信我的代码顶部包含该文件,请查看那里。我还可以说这段代码在一年内运行得很好,突然每次我尝试登录时都会出现此错误。正常的前端仍然显示数据库中的字段。只是/admin/登录端出现了问题

最佳答案

Fatal error: Call to undefined function getsqlvaluestring()

说明没有这个功能。我猜这个函数是另一个文件,而你忘了包含它。

关于php - fatal error : Call to undefined function getsqlvaluestring(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8990365/

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