Thanks. I did that now. I am still getting error below. I removed the third_party\vendor\aws\s3 directory but with little effect. I also set
$config['composer_autoload'] = TRUE; in config.php
( ! ) Fatal error: Class 'S3Client' not found in C:\xampp\htdocs\sub_crud\application\controllers\Configure.php on line 1145
Call Stack
# Time Memory Function Location
1 0.2160 152800 {main}( ) ...\index.php:0
2 0.2500 199312 require_once( 'C:\xampp\htdocs\sub_crud\system\core\CodeIgniter.php' ) ...\index.php:316
3 0.2820 1175432 Configure->__construct( ) ...\CodeIgniter.php:518
4 0.3280 3588080 Configure->_init( ) ...\Configure.php:21
5 0.3290 3589096 Configure->test( ) ...\Configure.php:38
A PHP Error was encountered
Severity: Error
Message: Class 'S3Client' not found
Filename: controllers/Configure.php
Line Number: 1145
Here is the code I am trying to run:
Code:
public function test(){
//Create a S3Client
$s3Client = new S3Client([
'profile' => 'default',
'region' => 'us-east-1',
'version' => 'latest'
]);
//Listing all S3 Bucket
$buckets = $s3Client->listBuckets();
foreach ($buckets['Buckets'] as $bucket){
echo $bucket['Name']."\n";
}
}
The instructs for autoload that you sent me says to :
The following items can be loaded automatically:- Classes found in the libraries/ directory
- Helper files found in the helpers/ directory
- Custom config files found in the config/ directory
- Language files found in the system/language/ directory
- Models found in the models/ folder
But I don't recall being asked by Composer where to put the Classes!!! I have no idea where they went.
proof that an old dog can learn new tricks