如何修复文件ApplicationError.PHP中用于发送电子邮件的PHP错误

如何修复文件ApplicationError.PHP中用于发送电子邮件的PHP错误,php,google-app-engine,email,Php,Google App Engine,Email,我正试图用PHP从Google App Engine发送一封电子邮件。要发送电子邮件,Require Once必须包含php文件Message.php:请参阅: Message.php文件包括: require_once 'google/appengine/api/mail/BaseMessage.php'; BaseMessage.php文件依次需要三个其他php文件: require_once 'google/appengine/api/mail_service_pb.php'; requ

我正试图用PHP从Google App Engine发送一封电子邮件。要发送电子邮件,
Require Once
必须包含php文件
Message.php
:请参阅:

Message.php
文件包括:

require_once 'google/appengine/api/mail/BaseMessage.php';
BaseMessage.php
文件依次需要三个其他php文件:

require_once 'google/appengine/api/mail_service_pb.php';
require_once 'google/appengine/runtime/ApiProxy.php';
require_once 'google/appengine/runtime/ApplicationError.php';
因此,总而言之,
Message.php
需要
BaseMessage.php
BaseMessage.php
还需要3个php文件

在需要的最后一个PHP文件之前,一切正常:

require_once 'google/appengine/runtime/ApplicationError.php';
然后发生致命错误:

Fatal error: Class 'google\appengine\runtime\Error' not found in
C:\Users\UserName\Dropbox\ApplicationName\google\appengine\runtime\
ApplicationError.php on line 22
这是第22行:

class ApplicationError extends Error {
这是谷歌提供的代码:

这不是我写的代码。所需文件的路径似乎正在运行,否则我会在第一个所需文件上收到错误消息。我已经测试了
require\u一次
代码行,这些代码引用了相同目录中的其他PHP文件,没有错误。因此,问题不是相对路径或PHP.ini文件的问题

我的PHP版本是
当前PHP版本:5.4.22
视窗7 XAMPP与Netbeans、Apache


如何解决此问题?

我已获得PHP电子邮件代码。我仍然不知道确切的问题是什么,但这一定与我的Netbeans IDE当前如何配置为PHP有关。GoogleAppEngineSDK的安装中内置了PHP,但我没有从GoogleAppEngine启动器运行我的应用程序。当我直接从GoogleAppEngine启动器运行我的应用程序时,代码运行正常。我猜Netbeans版本的PHP与googleappenginesdk版本的PHP有些不同。这导致其中一个文件出错。在任何情况下,我都得到了发送电子邮件的PHP代码。因此,代码将运行。这告诉我,我在Netbeans中对PHP的配置可能与在googleappenginesdk中的PHP版本中对PHP的配置不同。我可能会尝试在netbeans中调整PHP.ini文件,看看是否可以直接链接到PHP的Google App Engine SDK verion。

最新的SDK已经自动加载-您不需要对任何SDK函数使用require/include。来自Google的示例代码使用
require
。我愿意使用任何我能使用的代码来工作。所以,如果有人能给我指出代码和有效的配置,我将不胜感激。
class ApplicationError extends Error {