Codice PHP:
<?php
class Upload {
var $folders = null;
var $dir = null;
//costruttore
function Upload( $folders, $dir){
$this->folders= $folders;
$this->dir= $dir;
}
//funzione
function checkSize($option){
echo $this->folders;
echo $this->dir;
echo $option;
}
}
class UploadIMG extends Upload {
var $alb_imgwidth = null;
var $alb_imgquality = null;
//costruttore
function UploadIMG( $folders, $dir, $alb_imgwidth, $alb_imgquality){
$this->alb_imgwidth = $alb_imgwidth;
$this->alb_imgquality = $alb_imgquality;
//richiamo classe madre per istanziare le proprietā ereditate
parent::Upload($folders,$dir);
}
function pinco ($option){
$this->checkSize($option);
}
}
$o= new UploadIMG('uno','due','','');
$o->pinco('tre');
?>
Non vedo niente di sbagliato.