Formdan verileri girip enterledikten sonra
Dosya Kayıt Edilemedi mesajını alıyorum.. Yardımcı olursanız sevinirim.
Hata Mesajı:
Warning: move_uploaded_file(banner/17.jpeg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/reklamve/public_html/yonetim2/resim.php on line 32
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpFER17S' to 'banner/17.jpeg' in /home/reklamve/public_html/yonetim2/resim.php on line 32
dosya kayit edilemedi
hatayı veren satır;
kod
Dosya Kayıt Edilemedi mesajını alıyorum.. Yardımcı olursanız sevinirim.
Hata Mesajı:
Warning: move_uploaded_file(banner/17.jpeg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/reklamve/public_html/yonetim2/resim.php on line 32
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpFER17S' to 'banner/17.jpeg' in /home/reklamve/public_html/yonetim2/resim.php on line 32
dosya kayit edilemedi
hatayı veren satır;
PHP:
if (move_uploaded_file($_FILES['banner_resim']['tmp_name'], $resim_url1)) {
echo "Dosya Kayit Edildi.\n";
kod
PHP:
<?php
include ("yol.php");
$banner_resim = $HTTP_POST_VARS['banner_resim'];
$banner_adres = $HTTP_POST_VARS['banner_adres'];
$banner_yazi = $HTTP_POST_VARS['banner_yazi'];
if ($kaydet == 1)
{
if ($_FILES['banner_resim']['type'] != "image/gif" &&
$_FILES['banner_resim']['type'] != "image/jpeg" &&
$_FILES['banner_resim']['type'] != "image/jpg" &&
$_FILES['banner_resim']['type'] != "image/png")
{
echo "Dosya formatınız yanlış";
} else {
if($_FILES['banner_resim']['type'] == "image/gif") $uzanti=".gif";
else if($_FILES['banner_resim']['type'] == "image/jpeg") $uzanti=".jpeg";
else if($_FILES['banner_resim']['type'] == "image/jpg") $uzanti=".jpg";
else if($_FILES['banner_resim']['type'] == "image/png") $uzanti=".png";
if ($_FILES['resim']['size'] < 1024000) {
$ekle = mysql_query("insert into banner values('', '" . $banner_resim . "', '" . $banner_adres . "', '" . $banner_yazi . "')");
$banner_id=mysql_insert_id();
print mysql_error();
$banner_resim=$banner_id.$uzanti;
$resim_url1 = "banner/".$banner_resim;
if (move_uploaded_file($_FILES['banner_resim']['tmp_name'], $resim_url1)) {
echo "Dosya Kayit Edildi.\n";
$yaz=mysql_query("UPDATE banner SET banner_resim='$resim_url1' WHERE banner_id=$banner_id");
}
else echo "dosya kayit edilemedi";
} else {
$boyut = $_FILES['banner_resim']['size'];
$dosyamb = ($boyut / 1024) / 1024; // kb için bir 1024 ü sil
$mb = substr($dosyamb,0,4);
$hata1 = "Maks. dosya boyutu 1 MB. Sizin dosyanız: ".$mb." MB";
}
}
}
else
{
?>
<form action="resim.php" method="post" enctype="multipart/form-data" name="resimyukle">
<table width="600" border="0" cellspacing="0" cellpadding="0" align="CENTER" bgcolor="#FFFFDF">
<tr><td><font face="Verdana" size="2" color="Black"> Banner :</font> <input name="banner_resim" type="file" size="50"> </td></tr>
<td><font face="Verdana" size="2" color="Black"> Gidecek Adres :</font>
<input type="Text" name="banner_adres" size="50" value="http://"> </td></tr>
<td><font face="Verdana" size="2" color="Black">Üzerine Gelindiğinde Yazı :</font> <input type="Text" name="banner_yazi" size="50" value=""></td> </tr>
<tr><td>
<input type="hidden" name="kaydet" value="1" />
<input type="Submit" name="Send Mail" value="Gonder"></td>
<td><input type="Reset" name="Reset" value="Temizle"></td></tr>
</table></form>
<?
}
?>