• 07-01-2009, 11:50:47
    #10
    Üyeliği durduruldu
    Bazı arkadaşlar dediğimi anlamamış...

    <?php
    
    if($_FILES['oyunresmi']['tmp_name']) {
    copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    echo "oyun resmi yüklendi.";
    }else{
    echo "oyun resmi yüklenemedi.";
    }
    bu şekilde resim upload yapıyorum. dosya uploadıda aynı şekilde. bu iki if'i nasıl if içinde kullanacam onu soruyordum.
  • 07-01-2009, 12:34:04
    #11
    [KaDeSigN] adlı üyeden alıntı: mesajı görüntüle
    Bazı arkadaşlar dediğimi anlamamış...
    <?php
    if($_FILES['oyunresmi']['tmp_name']) {
    copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    echo "oyun resmi yüklendi.";
    }else{
    echo "oyun resmi yüklenemedi.";
    }
    bu şekilde resim upload yapıyorum. dosya uploadıda aynı şekilde. bu iki if'i nasıl if içinde kullanacam onu soruyordum.
    Dosya upload kodunu da yazarmısın.
  • 07-01-2009, 13:52:02
    #12
    <?
    if (!$oyunresmi and !$oyundosyasi) {
    echo "Hata";
    }
    else {
    if($_FILES['oyunresmi']['tmp_name']) {
    copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    echo "oyun resmi yüklendi.";
    }else{
    echo "oyun resmi yüklenemedi.";
    }

    }

    ?>








    if içinde if olarak

    <?
    if ($oyunresmi and $oyundosyasi) {
    if($_FILES['oyunresmi']['tmp_name']) {
    copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    echo "oyun resmi yüklendi.";
    }else{
    echo "oyun resmi yüklenemedi.";
    }
    else {
    echo "hata";
    }

    ?>
  • 07-01-2009, 16:13:42
    #13
    Eposta Aktivasyonu Gerekmekte
       <?php
    
    if($_FILES['oyunresmi']['tmp_name']) {
    copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']) or die ("Oyun resmi yüklenemedi");
    echo "oyun resmi yüklendi.";
    }else{
    echo "oyun resmi yüklenemedi.";
    }
  • 07-01-2009, 22:44:59
    #14
    [KaDeSigN] adlı üyeden alıntı: mesajı görüntüle
    Bazı arkadaşlar dediğimi anlamamış...
    <?php
    if($_FILES['oyunresmi']['tmp_name']) {
    copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    echo "oyun resmi yüklendi.";
    }else{
    echo "oyun resmi yüklenemedi.";
    }
    bu şekilde resim upload yapıyorum. dosya uploadıda aynı şekilde. bu iki if'i nasıl if içinde kullanacam onu soruyordum.
    Anladım fakat anlatamadım sanırım.

    <?php
    if($_FILES['oyunresmi']['tmp_name']){
    $tamam = copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    
    	if($tamam){
    		echo "oyun resmi yüklendi.";	
    	}else{
    		echo "oyun resmi yüklenemedi.";	
    	}
    }
    ?>
  • 09-01-2009, 00:10:35
    #15
       <?php
    if($_FILES['oyunresmi']['tmp_name']){
    $tamam = copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name']);
    
        if($tamam){
            echo "oyun resmi yüklendi.";    
        }else{
            echo "oyun resmi yüklenemedi.";    
        }
    }
    ?>
    burda $tamam a ne gerek varki ?

       <?php
    if($_FILES['oyunresmi']['tmp_name']){
    
        if(copy($_FILES['oyunresmi']['tmp_name'], "/resimler/".$_FILES['oyunresmi']['name'])){
            echo "oyun resmi yüklendi.";    
        }else{
            echo "oyun resmi yüklenemedi.";    
        }
    }
    ?>
    Kodumuzu minumum 1byte optimize etmiş olduk :P
  • 09-01-2009, 11:46:37
    #16
    Üyeliği durduruldu
    ErsaT ve KAlper arkadaşlara teşekkur ediyorum. tabi diğer ilgilenen arkadaşlara da... çok teşekkürler....