• 25-05-2009, 09:52:15
    #1
    Arkadaşlar js ile bitane dosya upload buldum ancak dosyayı gönderme kısmı php sadece birden fazla dosya göndermeye yarıyor js kısmı bakın

    http://haber.oyunlaralemi.com/galeri.php

    dosyayı gönder dediğimde veri gelmiyor sanki o input un adı galeriresim post ile çekip print_r ($ss); yaptım boş döndürdü veri gelmiyor sanki dolayısıyla uploadda yapmıyor bakın kodlar aşağıda

    galeri.php (Gönderme Kısmı)

    <html>
    
    <head>
    	<!-- Include the javascript -->
    	<script src="multifile_compressed.js"></script>
    </head>
    
    <body>
    
    <!-- This is the form -->
    <form enctype="multipart/form-data" action="upload.php" method="post">
    	<!-- The file element -- NOTE: it has an ID -->
    	<input id="my_file_element" type="file" name="galeriresim" >
    	<input type="submit">
    </form>
    Files:
    <!-- This is where the output will appear -->
    <div id="files_list"></div>
    <script>
    	<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->
    	var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 50 );
    	<!-- Pass in the file element -->
    	multi_selector.addElement( document.getElementById( 'my_file_element' ) );
    </script>
    </body>
    </html>
    upload.php (Upload)

    <?php
    $kaynak=$_FILES['galeriresim']['tmp_name'];
    $isim=$_FILES['galeriresim']['name'];
    $tipi=$_FILES['galeriresim']['type'];
    $buyukluk=$_FILES['galeriresim']['size'];
    $savelocation=$_SERVER['DOCUMENT_ROOT'].'/galeri';
    $dosya=$savelocation. "/".$_FILES['galeriresim']['name'];
    $up=move_uploaded_file ($_FILES['galeriresim']['tmp_name'], $dosya);
    if (!$up) { echo "Hata Var";}
    ?>
  • 25-05-2009, 10:03:40
    #2
    eklenen dosylar sanırım
    name="file_1"
    name="file_2"
    name="file_3"

    diye gidiyor

    bunlardan birini printlersen sonuç sayfasında görebilirsin

    <!-- This is the form -->
    <form enctype="multipart/form-data" action="upload.php" method="post">
    	<!-- The file element -- NOTE: it has an ID -->
    	<input name="file_3" type="file"><input style="position: absolute; left: -1000px;" name="file_2" type="file"><input style="position: absolute; left: -1000px;" name="file_1" type="file"><input style="position: absolute; left: -1000px;" id="my_file_element" name="file_0" type="file">
    	<input type="submit">
    </form>
    Files:
    <!-- This is where the output will appear -->
  • 25-05-2009, 14:44:35
    #3
    niphell adlı üyeden alıntı: mesajı görüntüle
    eklenen dosylar sanırım
    name="file_1"
    name="file_2"
    name="file_3"
    diye gidiyor
    bunlardan birini printlersen sonuç sayfasında görebilirsin
    <!-- This is the form -->
    <form enctype="multipart/form-data" action="upload.php" method="post">
    	<!-- The file element -- NOTE: it has an ID -->
    	<input name="file_3" type="file"><input style="position: absolute; left: -1000px;" name="file_2" type="file"><input style="position: absolute; left: -1000px;" name="file_1" type="file"><input style="position: absolute; left: -1000px;" id="my_file_element" name="file_0" type="file">
    	<input type="submit">
    </form>
    Files:
    <!-- This is where the output will appear -->
    Malesef olmuyor gene veri gelmiyo
  • 25-05-2009, 20:34:17
    #4
    iyi de arkadaşım sen name file_3 olarak atamışsın ama php de alırken galeriresim diye alıyosn :S
    $_FILES['galeriresim']
    böyle olanları
    $_FILES['file_3']
    olarak değiştirir misin tabii _3 artıcak onu da for ile yapabilirsin
  • 30-05-2009, 12:49:04
    #5
    empty değerleri belirtmelisin veya basit bir if ile hallolacak birşey.yapamadıysan pm, send msn..