Şurada işe yarar bi makale buldum ama olmadı bi daha ararız;
Tıkla
saol bunu gördüm denedim ama bu dbye yazıyor ama upload edemedim bi türlü
şöyle anlatayım
<?
include "ayar.php";
TabloAc();
require "eb.upload.php";
?>
<form id="form1" name="form1" method="POST" action="kaydet.php" ENCTYPE="multipart/form-data">
<table width="575" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="278"> </td>
<td width="436"><table width="390" height="168" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">Başlık
<input name="makale_baslik" type="text" value="" size="40" /></td>
</tr>
<tr>
<td colspan="2">Kategori:
<select name="kat_id">
<?php
$iler2 = mysql_query("SELECT kat_id, kat_baslik FROM kategoriler ORDER BY kat_id asC");
while($yaz2 = mysql_fetch_array($iler2))
{
echo "<option value=\"". $yaz2['kat_id'] ."\">". $yaz2['kat_baslik'] ."</option>";
}
?>
</select></td>
</tr>
<tr>
<td colspan="2">
<INPUT TYPE="file" name="resim">
</tr>
<tr>
<td colspan="2"> <textarea id="elm1" name="makale_metni" rows="18" cols="100" style="width: 80%"></textarea></td>
</tr>
<tr>
<td width="217" align="center"><label>
<input type="submit" value="GÖNDER" />
</label></td>
<td width="219" align="center"><input type="reset" value="TEMİZLE" /></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><div align="center"><a href="index.php">ADMIN SAYFASI</a></div></td>
</tr>
</table>
</form>
<?
TabloKapat();
?><?php
if( is_uploaded_file( $_FILES['upload']['tmp_name'] ) ) //gonderilen dosya temp kalsorüne taşınmış mı?
{
$img_data = getimagesize( $_FILES['upload']['tmp_name'] ); //resim datalarını oku
if( $img_data['2'] != 1 || $img_data['2'] != 2 ) //1= gif 2 = jpg
{ ///dosya beklediğimiz formatta mı kontrol et
$source = $_FILES['upload']['tmp_name'];
//hedef dosya adı kullanılıyor olabilir
//ona göre kullanılmayan bir isim yarat
$dest1 = generateUniqeNameForProductImage( $_FILES['upload']['name'] );
$dest = "../devamed/upload/".$dest1;
if( !move_uploaded_file( $source, $dest ) )
{
$err .= "Dosya upload hatası KOD :1 <br />";
}
else //resim büyükse küçüğünü oluştur
{
if( $img_data['0'] > 150 && $img_data['1'] > 150 )
{
resize_img( "../devamed/upload/",$dest1 );
}
}
}
else
{
$err .= "Sadece .jpg ve .gif formatlý resimleri upload edebilirsiniz. <br />";
}
}
else
{
$err .= "Dosya upload hatasý KOD :3 <br />";
}
function generateUniqeNameForProductImage( $filename )
{
return generateUniqeFileName( "../devamed/upload/", $filename );
}
function generateUniqeFileName( $dir, $filename )
{
$new_filename = $filename;
do
{
if( file_exists( $dir.$new_filename ) )
{
$clk = true;
$alfabe="abcdefghijkmnpqrstuvwxyz23456789";
$temp = substr(str_shuffle($alfabe),0,9);
$new_filename = $temp.$filename;
}
else
{
$clk = false;
}
}while( $clk );
return $new_filename;
}
?>ben nerde yanlış yaptım

böyle hatamı bulmak ya da doğru olanların üzerinden gitmek daha kolay olur