在php Linux OS中要求文件和sdk的正确方法

问题描述 投票:1回答:1

我正在我的Laravel项目中工作。我正在使用Windows进行开发,只是将laravel代码上传到AWS Elasticbeanstalk。我正在使用AWS开发工具包发送通知和使用Sendgrid发送电子邮件。

我正在本地环境中使用以下代码来使用composer访问aws sdk和sendgrid,

require __DIR__ . '\composer\vendor\autoload.php';
require __DIR__ . '\sendgrid-php\sendgrid-php.php';
require __DIR__ . '\aws\aws-autoloader.php';

它在我的Windows本地环境中工作正常,但是在Linux上它抛出以下错误

enter image description here

我已经安装了作曲器,但仍然显示相同的错误。任何帮助,将不胜感激。谢谢

php linux laravel amazon-web-services sendgrid
1个回答
0
投票

您不能在Linux上使用\(反斜杠)作为路径分隔符。您可以改用/(正斜杠)作为分隔符,因为这是Linux可接受的分隔符,并且Windows也接受此作为副作用。

© www.soinside.com 2019 - 2024. All rights reserved.