Hi,
 Anybody knows the solution to the following:
 I am trying to force the download of a file called
dadada.txt.
 I have a file named downloadFile.php 
 It is invoked like this:
   <a
href="downloadFile.php?daFile="path/dadada.txt">dadada.txt</a>

 However within the downloadFile.php the $daFile
argument is empty. This is the file:

 <? 
        session_start();
        
        if($_SESSION['isValidSession'] == 'Y'){
                $daFile = $_GET['daFile'];
                $size=filesize($daFile);
                 
                if($daFile != ""){
                        //header("Cache-control: private");
                        header("Content-Type: 

texapplication/octet-stream\n");
                        header("Content-Length:" . $size ."\n");
                        header("Content-Disposition: attachment; 

filename=\"$daFile\"\n");
                        // header("Content-Transfer-Encoding: binary");
                }

                require("footer.php");
                

                
        }else{
                printf("<br> You are not autherized to view this 

page");
        }
                
?>    


 A download happens but the downloaded file name is
"downloadFile" and not "dadada.txt" 

 Why would you think this is happening?

Cheers.


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to