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)
相关代码行:
$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]);
这意味着什么,我为什么要看到它?
largeQ
幕布斯6054654
慕少森
Cats萌萌