相关疑难解决方法(0)

PHP错误消息"通知:使用未定义的常量"是什么意思?

PHP在日志中写入此错误:"注意:使用未定义的常量".

日志错误:

PHP Notice:  Use of undefined constant department - assumed 'department' (line 5)
PHP Notice:  Use of undefined constant name - assumed 'name' (line 6)
PHP Notice:  Use of undefined constant email - assumed 'email' (line 7)
PHP Notice:  Use of undefined constant message - assumed 'message' (line 8)
Run Code Online (Sandbox Code Playgroud)

相关代码行:

$department = mysql_real_escape_string($_POST[department]);
$name = mysql_real_escape_string($_POST[name]);
$email = mysql_real_escape_string($_POST[email]);
$message = mysql_real_escape_string($_POST[message]);
Run Code Online (Sandbox Code Playgroud)

它是什么意思,我为什么看到它?

php constants undefined

149
推荐指数
3
解决办法
57万
查看次数

PHP:获取"使用未定义的常量COOKIE_LOGIN"我该如何解决这个问题?

我没有对影响COOKIE的代码进行任何更改,现在我得到以下内容:

使用未定义的常量COOKIE_LOGIN - 假设'COOKIE_LOGIN'

//Destroy Cookie
if (isset($_COOKIE[COOKIE_LOGIN]) && !empty($_COOKIE[COOKIE_LOGIN]))
    setcookie(COOKIE_LOGIN,$objUserSerialized,time() - 86400 );
Run Code Online (Sandbox Code Playgroud)

我不知道我需要做些什么来实际改变这个,因为我不知道什么是开始的,因此无法跟踪问题.

谢谢.

php cookies

0
推荐指数
1
解决办法
3763
查看次数

标签 统计

php ×2

constants ×1

cookies ×1

undefined ×1