语法错误意外T

我在这行$this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation');获得以下错误syntax error, unexpected T_CONSTANT_ENCAPSED_STRING $this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation');'' and ""犯了错误吗? 我也通过$ data的名称,可以将其包含在主题中而不是模型调用中?


你可能忘了逗号:试试这个:

$this->email->subject($this->core_model->companyDetails()->coreCompanyName, 'User Registration Confirmation');

代替

$this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation');

你错过了一个点。

$this->email->subject($this->core_model->companyDetails()->coreCompanyName.'User Registration Confirmation');

你错过了连接两个字符串(coreCompanyName和“用户注册确认”)吗?在两者之间写一个“。”。

代码应该如下所示:

$this->email->subject($this->core_model->companyDetails()->coreCompanyName . ' User Registration Confirmation');
链接地址: http://www.djcxy.com/p/11971.html

上一篇: Syntax error unexpected T

下一篇: PHP Parse error: syntax error, unexpected T