Form dosyası ki kod;
<div class="inputSpan">Fotoğrafı Yükle</div><input type="file" name="upload" class="inputStyle" /><br/>
$required = explode(",",$_POST['required']);
$title = $_POST['form_title'];
$email_main = explode(",", $_POST['email_main']);
$email_cc = explode(",", $_POST['email_cc']);
$email_bcc = explode(",", $_POST['email_bcc']);
if (!empty($_POST['First_Name'])){$customer = $_POST['First_Name'];} elseif (!empty($_POST['Name'])){$customer = $_POST['Name'];}else{$customer='Customer';}
if (!empty($_FILES['upload']['name'])){
$name_of_file = basename($_FILES['upload']['name']);
$type_of_file = substr($name_of_file,strrpos($name_of_file, '.') + 1);
$size_of_file = $_FILES["upload"]["size"]/1024;//size in KBs
$max_allowed_file_size = 1000; // size in KB
$allowed_extensions = array("jpg", "jpeg", "doc", "docx", "pdf");
if($size_of_file > $max_allowed_file_size ) {
$error .= "Dosyanın boyutu daha az olmalıdır ".$max_allowed_file_size."kb<br/>";}
$allowed_ext = false;
for($i=0; $i<sizeof($allowed_extensions); $i++) {
if(strcasecmp($allowed_extensions[$i],$type_of_file) == 0) {
$allowed_ext = true; }}
if(!$allowed_ext) {
$error .= "Yüklenen dosya türünü desteklenmiyor. ". " Sadece aşağıdaki dosya türleri desteklenir: ".implode(',',$allowed_extensions)." dosya türüdür .".$type_of_file."<br/>";}
$upload_folder = "uploads/";
$path_of_file = $upload_folder . $name_of_file;
$tmp_path = $_FILES["upload"]["tmp_name"];
if(is_uploaded_file($tmp_path)) {
if(!copy($tmp_path,$path_of_file)) {
$error .= 'Hata yüklenen dosyayı kopyalarken<br/>'; }}}Dipnot : Form html olarak mail e gönderiyor.--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 23:24:26 -->-> Daha önceki mesaj 22:26:35 --
halletim teşekkürler arkadaşlar
çok teşekkürler ilginiz için.