gpt4 book ai didi

php - 为什么显示以下错误?

转载 作者:行者123 更新时间:2023-12-03 09:15:37 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Reference - What does this error mean in PHP?

(37 个回答)


4年前关闭。




网页中显示以下错误,但代码正在运行..我只想知道为什么显示以下错误?

注意:使用未定义的常量食物 - 在第 33 行的 E:\server\htdocs\table\action.php 中假定为“食物”
enter image description here

以下链接是代码源。
https://drive.google.com/open?id=1u59Z0WipMgPEE10KP1c12maoUS-KqhlA
https://drive.google.com/open?id=1ngHyhwOdCbryj7UvZ_8tE2pIqp2uoSmE

最佳答案

即使没有发生它的代码示例,我相信您没有使用引号 '"在您的数组键名中。

您只需将 key 名称包装到引号中,例如:

$your_array['food']; 
// or
$your_array["food"];

关于php - 为什么显示以下错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47828665/

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