• 08-07-2015, 15:59:58
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    foreach ($xml->product[$i]->images as $images) {      
    		foreach ($images as $img1) {
    		$damga= "damga.png";
    		$parcala = explode('/',$img1); 
    		$sira = count($parcala)-1; 
    		$yeniresim = "image/catalog/urunler/$code-$parcala[$sira]";
    		resim_damga('$img1','$damga','$yeniresim'); 
    		}
    	   }
    şu şekilde bir döngüm var. ama sadece bir kez dönüyor. Anlayamıyorum. Yardımcı olabilir misiniz.

    beyin.dll bulunamadı modundayım şu an.
  • 08-07-2015, 16:46:51
    #2
    Merhaba aldığın xml cıktısını verirmisin.
  • 08-07-2015, 16:48:12
    #3
    her bir product için dönecek ise product[$i] için for loop açtın mı?
  • 08-07-2015, 18:26:46
    #4
    function resim_damga($resim, $damga_resmi, $yeni_resim_adi)
    		{
        $foto = imagecreatefromjpeg($resim);
        $damga = imagecreatefrompng($damga_resmi);
        $sag_bosluk = 10;
        $alt_bosluk = 10;
        $sx = imagesx($damga);
        $sy = imagesy($damga);
        imagecopy($foto, $damga, imagesx($foto) - $sx - $sag_bosluk, imagesy($foto) - $sy - $alt_bosluk, 0, 0, imagesx($damga), imagesy($damga));
        imagepng($foto, $yeni_resim_adi);
        imagedestroy($foto);
    		}
    
    	foreach ($xml->product[$i]->images as $images) {      
    		 
    		
    		foreach ($images as $img) {
    			
    		
    		
    			echo "$img <br>";
    		$damga= "damga.png";
    		$parcala = explode('/',$img); 
    		$sira = count($parcala)-1; 
    		$yeniresim = "image/catalog/urunler/$code-$parcala[$sira]";
    		resim_damga($img,$damga,$yeniresim); 
    		}
    	   }
    kod bu.

    <images><img_item type_name="">15.jpg</img_item>
    <img_item type_name="">16.jpg</img_item></images>
    şeklinde xml çıktısı var.

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 18:26:46 -->-> Daha önceki mesaj 18:25:34 --

    Sharaka adlı üyeden alıntı: mesajı görüntüle
    Merhaba aldığın xml cıktısını verirmisin.
    recepuncu adlı üyeden alıntı: mesajı görüntüle
    her bir product için dönecek ise product[$i] için for loop açtın mı?
    sanırım göremediğim bir nokta var. Sadece ilk resmi işliyor diğerini işlemiyor. Echo yaptığımda ise iki resmin de çıktısını veriyor.