im trying to work/modify with a class i downloaded. sadly im not getting it. I have yahoogled oop and its not making me any wiser.
can some one explain please what i shold be doing?

first of all the classes have a number of vars in the original form like so being the one i want to use

public $fullPath= DD_DIR;   
    public $fileToDownload = 'ajax-loader.gif'; // File to download listed in the 'download' directory

ok so as i understood i have to construct to use a post value. i did this

function __construct() {
        $this-> $fileToDownload = $_POST['image_name'];

    and changed the var to

    public $fileToDownload ; 

All the wheels fell off, and nothing get displayed on the page that includes the class. and I hoped some one would give me a jump start.

2 Years
Discussion Span
Last Post by edbr

thank you i had read it but my problem still confounds me

it looks to me that i used __construct as you did in your case

function __construct() { $this->colour = 'white';

so i am sure i am doing something fundamentaly wrong, just cant see it

$this-> $fileToDownload = $_POST['image_name'];

should be:

$this->fileToDownload = $_POST['image_name'];

hA!! thank you i got totally frustrated with it , on the verge of passsing on OOp yest again . ill keep going :)


page showing but downloading 'quote' download not the image name i put in the form
so this must be wrong?

`public $fileToDownload = 'ajax-loader.gif'; // File to download listed in the 'download'

changed to public $fileToDownload `


i posted a file 3.jpg but download shows just download no actual file as such


it shows a download alert (windows) with the usual open or save options but shows the file as 'download' no extension shown


@mushfik thank yu for answering pritaeas already saw that rookie mistake :)

I hit fruther problems testing this, the download error caused a download of something and it caused wamp to just keep downloading to the point it crashed my harddrive . took me a while to see the problem as i thougt i had a drive corrupted but will try again today with bettr explanation
im feeling as dumb as a bag of hammers at the moment :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.