PHP致命错误:函数名称必须是错误中的字符串

时间:2017-06-12 21:41:14

标签: php email logging

我的错误日志中出现此错误:

PHP Fatal error:  Function name must be a string in /home2/x7w7i0o6/public_html/admin/mail.php on line 41

这是第41行的代码:

if ($input->p['receiverlist'] == "single") {
    $userid = getuserid($input->pc['username']);

    if ($userid == 0) {
        $serveranswer(0, "Username <strong>" . $input->pc['username'] . "</strong> was not found");
    }

由于邮件不起作用,问题是什么。感谢

1 个答案:

答案 0 :(得分:4)

不要将$放在函数名称前面(除非你想要variable function)。

$serveranswer(0, "Username <strong>" . $input->pc['username'] . "</strong> was not found");

应该是:

serveranswer(0, "Username <strong>" . $input->pc['username'] . "</strong> was not found");