Are you trying to let the user download the file? if so, can try something like this

<? 

/*Do your login checks here*/    

    define(\'FILEDIR\', \'/yourdirectory/filesfordownloads/\'); 
    $path = FILEDIR . $file; 
    
    if(!is_file($path))
    { 
        print \"File does not exist!\";
        //header(\"Location: error.php\"); 
        exit(); 
    } 
    
   //force download dialog 
    header(\"Content-type: application/octet-stream\\n\"); 
    header(\"Content-disposition: attachment; filename=\\\"$file\\\"\\n\"); 
    header(\"Content-transfer-encoding: binary\\n\"); 
    header(\"Content-length: \" . filesize($path) . \"\\n\"); 

    //send file contents 
    $fp=fopen($path, \"r\"); 
    fpassthru($fp); 
?> 

>If one creates a file outside the web space on a server. >How doe\'s one connect to 
>this from a HTML or PHP page? 
>
>As I understand it. It is not as simple as normal html >link. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to