Skip to main content

Posts

Showing posts from 2017

Upload file on s3 AWS using PHP

Upload file on s3 AWS using PHP Our Next Topic is on AWS server, in this tutorial we are assuming that you are already aware with aws,in this tutorial we are going to demonstrate that how to upload files to s3 from EC2 or from your local machine so let's start.      Please follow following steps      1. Create new direct on your local sever and paste all the downloaded files.      2. Create form for file uploed in that directyory and paste following code . <?php              include ( 'checkimg.php' ); // getExtension Method              include ( 's3_config.php' );              $msg = '' ;              if ( $_SERVER [ 'REQUEST_METHOD' ] == "POST" )              {              $name = $_FILES [ 'file' ][ 'name' ];              $size = $_FILES [ 'file' ][ 'size' ];              $tmp = $_FILES [ 'file' ][ 'tmp_name' ];              $ext = getExtension ( $name );