我使用 phar 文件在我的弹性 beanstalk 应用程序中安装 aws sdk for php,:
require_once __DIR__ . '/../AWS-SDK/aws.phar';
当我第一次运行脚本时,它成功了!但是当我再次尝试时,我得到了这个错误:
Warning: require(phar://aws.phar/aws-autoloader.php): failed to open stream: phar error: invalid url or non-existent phar "phar://aws.phar/aws-autoloader.php" in /var/app/current/src/utils/AWS-SDK/aws.phar on line 3 Fatal error: require(): Failed opening required 'phar://aws.phar/aws-autoloader.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/app/current/src/utils/AWS-SDK/aws.phar on line 3
如何解决问题?