Ciao a tutti , ho questa classe:
Codice PHP:
class upload {
var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;
function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {
$this->set_file($file);
$this->set_destination($destination);
$this->set_permissions($permissions);
$this->set_extensions($extensions);
$this->set_output_messages('direct');
if (tep_not_null($this->file) && tep_not_null($this->destination)) {
$this->set_output_messages('session');
if ( ($this->parse() == true) && ($this->save() == true) ) {
return true;
} else {
// self destruct
$this = null;
return false;
}
}
}
quando la richiamo trovo questo errore :
Fatal error: Cannot re-assign $this in D:\Programmi\Apache Group\Apache2\htdocs\oscommerce\catalog\admin\incl udes\classes\upload.php on line 31
la linea 31 è : $this = null;
appena sotto // self destruct
qualcuno capisce dove c'è l'errore?