Skip to content

Instantly share code, notes, and snippets.

@vhchung
vhchung / put-object-on-aws-s3.php
Last active September 14, 2018 07:32 — forked from keithweaver/put-object-on-aws-s3.php
Upload an image/object to an AWS S3 Bucket using PHP
<?php
// Installed the need packages with Composer by running:
// $ composer require aws/aws-sdk-php
require 'vendor/autoload.php';
$bucketName = 'YOUR_BUCKET_NAME';
$filePath = './YOUR_FILE_NAME.png';
$keyName = basename($filePath);
$IAM_KEY = 'YOUR_SECRET_ACCESS_KEY';
@vhchung
vhchung / generator.php
Created December 21, 2015 02:42 — forked from tawfekov/generator.php
Doctrine2 Generate Entities form Existing Database
<?php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
// config
$config = new \Doctrine\ORM\Configuration();