This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Force SSL (https) except on localhost | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{REMOTE_ADDR} !=::1 | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Dossier de destination | |
$target_dir = "uploads/"; | |
// Nom du fichier envoyé | |
$filename = basename($_FILES["file"]["name"]); | |
// Chemin de destination complet (dossier + fichier) | |
$target_file = $target_dir . $filename; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Instantiate an Amazon S3 client. | |
$s3 = new Aws\S3\S3Client([ | |
'version' => 'latest', | |
'region' => 'eu-west-1', | |
'credentials' => [ | |
'key' => 'your-key', | |
'secret' => 'your-secret' | |
] |