sabahdan beri uğraşuyorum basit bi post kontrolünü yaptıramadım gitti
sorun upload.phpde
index.html
upload.php
sorun upload.phpde
index.html
Kod:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Resim Upload Örneği</title>
</head>
<body>
<table width="500px" border="0">
<tr>
<td><form action="upload.php" method="post" enctype="multipart/form-data" name="upload" id="upload">
<table width="100%" border="0">
<tr>
<td colspan="3">Resim Upload Örneği | Ferhat YEŞİLMEN</td>
</tr>
<tr>
<td width="33%"> Resim Seçiniz</td>
<td width="2%">:</td>
<td width="65%"><label for="resim"></label>
<input type="file" name="resim" id="resim" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="yukle" id="yukle" value="Yükle" /></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
Kod:
<?php
echo '<form action="" method="post">
<input type="text" name="yazi">
<input type="submit" name="gonder" value="gonder" />
</form>';
$yazi=$_POST['yazi'];
if(empty($yazi)==false){
require_once ('class.upload.php'); // Class ' ımızı dahil ediyoruz.
$resim = $_FILES['resim']; // Form'dan yüklenen resim.
$yukle = new upload($resim); //Sınıfımızı Başlatıyoruz.
$klasor = './resimler'; //Resmin Yükleneceği Klasör
if ($yukle->uploaded) { // Upload İşlemi Başarılı olursa aşağıdaki işlemleri yapacak
$yukle->image_text = "$yazi";
$yukle->image_text_color = '#000000';
$yukle->image_text_percent = 80;
$yukle->image_text_background = '#FFFFFF';
$yukle->image_text_background_percent = 70;
$yukle->file_new_name_body = 'upload';
$yukle->process($klasor);
if ($yukle->processed) { // İşlemler Başarılı olursa
echo 'Resim Yüklendi ve İşlemler Uygulandı.';
echo $yukle->file_dst_name;
$yukle->clean();
} else { // Başarılı olmadığı durumda
echo 'Hata resim yüklenemedi. : ' . $yukle->error;
}
}
}
?>