使用斜杠时出现奇怪的错误

Nyx*_*nyx 3 php codeigniter sendgrid

我正在使用Sendgrid的PHP库(https://github.com/sendgrid/sendgrid-php).按照说明,我不得不使用这行代码:

$mail = new SendGrid\Mail();
Run Code Online (Sandbox Code Playgroud)

我收到错误:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/d/public_html/ac/application/controllers/email.php on line 20

Parse error: syntax error, unexpected T_STRING in /home/d/public_html/ac/application/controllers/email.php on line 20
Run Code Online (Sandbox Code Playgroud)

使用有什么问题'\'吗?对我来说似乎很奇怪......我怎么能让它发挥作用?

Jer*_*oen 7

\命名空间的一部分,这是PHP 5.3中的一个新功能.