Skip to content

Instantly share code, notes, and snippets.

@zaherg
Created March 16, 2012 08:44
Show Gist options
  • Save zaherg/2049187 to your computer and use it in GitHub Desktop.
Save zaherg/2049187 to your computer and use it in GitHub Desktop.
installing amazon-sdk as library
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Example extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
$this->load->library('awslib');
$s3 = $this->awslib->get_s3();
$result = $s3->list_buckets();
echo '<pre>' . print_r($result, TRUE) . '</pre>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment