gpt4 book ai didi

php - PHP中的&前缀是什么?

转载 作者:行者123 更新时间:2023-12-04 16:04:50 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Reference - What does this symbol mean in PHP?

以下代码的第三行在我的本地环境中运行良好,但在我的生产服务器上返回错误。

& 前缀是什么意思,为什么它会在我的生产服务器上返回错误?

下面是我的代码;

function add_real_escape_string($value) {
if (is_array($value)) {
foreach($value as &$item) {
$item = add_real_escape_string($item);
}
} else {
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
$value = mysql_real_escape_string($value);
}
return $value;
}

返回的错误是:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in init.php on line 345

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