• 19-04-2017, 11:01:49
    #1
    Üyeliği durduruldu
    goster.php deki tabloyu
    <?php
    header("Content-type: application/vnd.ms-doc");
    header("Content-Disposition: attachment; Filename=Word Dökümanı.doc");
    ?>

    bu şekilde word olarak indiriyorum ben bunu masaüstüne ama bunu direk ftp ye nasıl kaydettirebilirim word olarak ? şimdiden tşk ederim
  • 19-04-2017, 13:37:00
    #2
    sparta adlı üyeden alıntı: mesajı görüntüle
    goster.php deki tabloyu
    <?php
    header("Content-type: application/vnd.ms-doc");
    header("Content-Disposition: attachment; Filename=Word Dökümanı.doc");
    ?>

    bu şekilde word olarak indiriyorum ben bunu masaüstüne ama bunu direk ftp ye nasıl kaydettirebilirim word olarak ? şimdiden tşk ederim
    <?php 
    $ftp_server=""; 
    $ftp_user_name=""; 
    $ftp_user_pass=""; 
    $file = "";//tobe uploaded 
    $remote_file = ""; 
    
    // set up basic connection 
    $conn_id = ftp_connect($ftp_server); 
    
    // login with username and password 
    $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); 
    
    // upload a file 
    if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { 
        echo "successfully uploaded $file\n"; 
        exit; 
    } else { 
        echo "There was a problem while uploading $file\n"; 
        exit; 
        } 
    // close the connection 
    ftp_close($conn_id); 
    ?>
    goster.php'den dışa vurduğun veriyi $file olan yere gönderirsen, ftp servera istediğin dosyayı yükleyebilirsin.
  • 31-01-2020, 01:44:19
    #3
    DWather adlı üyeden alıntı: mesajı görüntüle
    <?php
    $ftp_server="";
    $ftp_user_name="";
    $ftp_user_pass="";
    $file = "";//tobe uploaded
    $remote_file = "";
    
    // set up basic connection
    $conn_id = ftp_connect($ftp_server);
    
    // login with username and password
    $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
    
    // upload a file
    if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
        echo "successfully uploaded $filen";
        exit;
    } else {
        echo "There was a problem while uploading $filen";
        exit;
        }
    // close the connection
    ftp_close($conn_id);
    ?>
    goster.php'den dışa vurduğun veriyi $file olan yere gönderirsen, ftp servera istediğin dosyayı yükleyebilirsin.
    merhaba hocam There was a problem while uploading hata alıyorum
  • 31-01-2020, 01:51:42
    #4
    SeoKeyword adlı üyeden alıntı: mesajı görüntüle
    merhaba hocam There was a problem while uploading hata alıyorum
    Merhaba,

    güvenlik önlemiyle karşılaştığınız zaman böyle bir hata alırsınız.

    https://www.php.net/manual/en/function.ftp-pasv.php bu işiniz görecektir.