我正在使用postmark inbound email函数构建一个PHP脚本--演示PHP代码抛出了各种各样的错误。我几乎逐字地从演示页面复制了代码,但\似乎导致了PHP错误。Demo code homepage is here
以及我正在使用的代码:
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/ T_STRING /page.api.email.php中出现意外路径
第10行是:\Postmark\Autoloader::register();
发布于 2012-08-28 20:29:59
听起来您可能没有运行Postmark 5.3 - Namespaces (\Postmark\Autoloader)仅在>= 5.3中受支持
发布于 2016-06-14 20:28:57
试试这个:
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'));https://stackoverflow.com/questions/12159126
复制相似问题