file_functions.php

<?php


function force_download($file)
{
    
$dir      "web_images/";
    if ((isset(
$file))&&(file_exists($dir.$file))) {
       
header("Content-type: application/force-download");
       
header('Content-Disposition: inline; filename="' $dir.$file '"');
       
header("Content-Transfer-Encoding: Binary");
       
header("Content-length: ".filesize($dir.$file));
       
header('Content-Type: application/octet-stream');
       
header('Content-Disposition: attachment; filename="' $file '"');
       
readfile("$dir$file");
    } else {
       echo 
"No file selected";
    } 
//end if

}//end function


?>

Paul's Code Library

Categories

Home

AJAX

classes

database_functions

date_functions

file_functions

googlevideo_and_youtube_api

htaccess

image_functions

string_functions