Failed opening required 'AWSSDKforPHP/aws.phar'
(include_path='.:/usr/share/pear:/usr/share/php:/home/ec2-user/pear/share/pear') in /var/www/html/index.php on line 3
This error appears when it is through browser and its working fine when i run PHP index.php in command line
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '/home/ec2- user/pear/share/pear');
require 'AWSSDKforPHP/aws.phar';
use Aws\S3\S3Client;
// Use the high-level iterators (returns ALL of your objects).
$objects = $s3->getIterator('ListObjects', array('Bucket' => $bucket));
//echo "Keys retrieved!\n";
echo "<h1>List of Blogs </h1>";
foreach ($objects as $object) {
echo $object['Key'] . "\n";
}
?>