PHP Classes

File: testDownload.php

Recommend this page to a friend!
  Classes of Olavo Alexandrino   Easy Download   testDownload.php   Download  
File: testDownload.php
Role: Example script
Content type: text/plain
Description: Test of Class
Class: Easy Download
Serve a file for download with a PHP script
Author: By
Last change: Added include file
Date: 20 years ago
Size: 545 bytes


Class file image Download

// path example
$myPath = "/home/client/www/site1/folderDownload/";

// New Object
$objDownload = new EasyDownload();

// Set physical path

// Set file name on the server (real full name)

// In case that it does not desire to effect download with original name.
// It configures the alternative name
$objDownload->setFileNameDown($_GET["fileName"] . $_GET["extension"]);

// get file