问题描述
我没有使用 Composer for AWS SES 从 zip 文件安装文件,并按照文档包含它们:require '/path/to/aws-autoloader.PHP';
问题是所有代码示例都假设您使用的是 Composer,因此我正在尝试寻找以下替代方法:
use Aws\Ses\SesClient;
use Aws\Exception\AwsException;
编辑:
完整代码如下:
use Aws\Ses\SesClient;
use Aws\Exception\AwsException;
//Create a SESClient
$SesClient = new SesClient([
'profile' => 'default','version' => '2010-12-01','region' => 'us-east-1'
]);
当我删除“use”行时,出现错误:找不到“SesClient”类
我想我错过了“使用”的作用以及如何在 Composer 之外复制它。自动加载器文件有一个 $mapping 数组:
$mapping = array(
'JmesPath\Fndispatcher' => __DIR__ . '/JmesPath/Fndispatcher.PHP',... etc)
然后在该数组下方:
spl_autoload_register(function ($class) use ($mapping) {
if (isset($mapping[$class])) {
require $mapping[$class];
}
},true);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)