首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Postmark PHP演示错误

Postmark PHP演示错误
EN

Stack Overflow用户
提问于 2012-08-28 20:21:09
回答 2查看 267关注 0票数 0

我正在使用postmark inbound email函数构建一个PHP脚本--演示PHP代码抛出了各种各样的错误。我几乎逐字地从演示页面复制了代码,但\似乎导致了PHP错误。Demo code homepage is here

以及我正在使用的代码:

代码语言:javascript
复制
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();

EN

回答 2

Stack Overflow用户

发布于 2012-08-28 20:29:59

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

票数 1
EN

Stack Overflow用户

发布于 2016-06-14 20:28:57

试试这个:

代码语言:javascript
复制
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'));
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12159126

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档