PHP Classes

File: file.phtml

Recommend this page to a friend!
  Classes of Slava Ivanov   Download file   file.phtml   Download  
File: file.phtml
Role: Example script
Content type: text/plain
Description: example of use
Class: Download file
download any file from a server
Author: By
Last change:
Date: 21 years ago
Size: 505 bytes


Class file image Download
// This is an example of PHP script using DOWNLOADFILE class.
// On any page you need to create a link to this script.
// By pressing on this link you will automatically get a dialog box to download the "filename.ext" file.


$downloadfile = new DOWNLOADFILE("/dir1/dir2/dir3/filename.ext");
if (!
$downloadfile->df_download()) echo "Sorry, we are experiencing technical difficulties downloading this file. Please report this error to Technical Support.";