Aktív témák

  • Forest_roby

    őstag

    Hi!

    Azt szeretném elérni, hogy readfile(filename) -re ne megjelenítse a file tartalmát, hanem behozza a file mentése ablakot és az adot file-t így le tudnám menteni a winyóra...
    így próbálom elérni:
    <?php
    $_GET[''file''];
    print ''<br><br>file neve: ''.$_GET[''file''].''<br><br>'';

    $path = ''/var/www/****/***/**/*/''.$_GET[''file''];

    header('Content-Description: File Transfer');
    header('Content-Type: application/force-download');
    header('Content-Length: ' . filesize($path));
    header('Content-Disposition: attachment; filename=' . basename($path));
    readfile($path);
    ?>


    de ezt írja ki hibának:

    file neve: file.name

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/site/open.php:3) in /var/www/site/open.php on line 7

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/site/open.php:3) in /var/www/site/open.php on line 8

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/site/open.php:3) in /var/www/site/open.php on line 9

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/site/open.php:3) in /var/www/site/open.php on line 10
    file.tartalma............


    Mit rontottam el?

    Előre is köszi a válaszokat!

    Forest

    [Szerkesztve]

Aktív témák