Salve, ho una classe che mi sono costruito in locale (PHP 5), ma in remoto (PHP 4) mi crea questo problema
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /web/...class.Configure.php on line 3
cosa sbaglio?
Codice PHP:
class Configure {
var $_db_host;
var $_db_user;
var $_db_password;
var $_db_nome;
var $_PORZIONE_MAX;
var $_COPERTI_MAX;
function Configure(){
$this->_db_host = 'xxxx';
$this->_db_user = 'xxxx';
$this->_db_password = 'xxxx';
$this->_db_nome = 'xxxx';
$this->_PORZIONE_MAX = "100";
$this->_COPERTI_MAX = "100";
}
function _get($cosa){
$cosa = trim($cosa);
switch($cosa[0]){
case "h";
$ritorno = $this->_db_host;
break;
case "u";
$ritorno = $this->_db_user;
break;
case "p";
$ritorno = $this->_db_password;
break;
case "n";
$ritorno = $this->_db_nome;
break;
/*
case "m";
$ritorno = $this->_PORZIONE_MAX;
break;
case "c";
$ritorno = $this->_COPERTI_MAX;
break;
*/
default;
$ritorno = false;
break;
}
return $ritorno;
}
}