Skip to content

Instantly share code, notes, and snippets.

View webrf's full-sized avatar

Rodrigo webrf

  • Latvia
View GitHub Profile
@webrf
webrf / MultipleEmailAttachments.php
Created April 14, 2015 19:05
Multiple Email Attachments PHP
<?php
if(isset($_FILES) && (bool) $_FILES) {
$AllowedExtensions = ["pdf","doc","docx","gif","jpeg","jpg","png","rtf","txt"];
$files = [];
$server_file = [];
foreach($_FILES as $name => $file) {
$file_name = $file["name"];
$file_temp = $file["tmp_name"];
foreach($file_name as $key) {
$path_parts = pathinfo($key);