我正在使用邮戳入站电子邮件功能构建一个 PHP 脚本 - 演示 PHP 代码为我抛出了各种错误。我从演示页面几乎逐字复制了代码,但 \ 似乎导致了 PHP 错误。演示代码主页在这里
我正在使用的代码:
require_once '/postmark/Autoloader.php';
\Postmark\Autoloader::register();
// this file should be the target of the callback you set in your postmark account
$inbound = new \Postmark\Inbound(file_get_contents('php://input'));
错误:
解析错误:语法错误,第 10 行 /home/path/page.api.email.php 中的意外 T_STRING
第 10 行是:\Postmark\Autoloader::register();