I'm using the following to upload files to my Amazon S3 bucket using php:
$s3 = new S3(awsAccessKey, awsSecretKey);
$s3->putBucket("example", S3::ACL_PUBLIC_READ);
$s3->putObjectFile($fileTempName, "example", $fileName, S3::ACL_PUBLIC_READ);
How can I upload to example/subfolder?
This is not a duplicate - the answer was not clear and the question was different.