0

我收到以下通知,

Notice: Use of undefined constant username - assumed 'username'

........

以及生成它的代码,

$acct = array(username => $username, password => $password, domain => $domain);

阿米在这里做错了什么。原始代码有这样的东西,

$acct = array( username => "someuser", password => "pass123", domain => "thisdomain.com");

谢谢。

4

1 回答 1

1

尝试引用密钥,如下所示:

$acct = array('username' => $username, 'password' => $password, 'domain' => $domain);
于 2012-05-20T15:45:57.590 回答