邮戳PHP演示错误

邮戳PHP演示错误,php,email,Php,Email,我正在使用postmark inbound email函数构建一个PHP脚本,演示PHP代码为我抛出了各种各样的错误。我几乎是逐字逐句地从演示页面复制了代码,但是\似乎导致了PHP错误 我使用的代码是: require_once '/postmark/Autoloader.php'; \Postmark\Autoloader::register(); // this file should be the target of the callback you set in your postma

我正在使用postmark inbound email函数构建一个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_字符串


第10行是:\Postmark\Autoloader::register()

听起来您可能没有运行PHP>=5.3-(\Postmark\Autoloader)仅在>=5.3中受支持

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'));