hey i think i have found the bug!
in php i can't use 2 constructors?? for diferent number of parameters??
Like:
class FTPligacao{
var $host;
var $port;
var $username;
var $password;
var $remotedir;
var $id_ligacao;
function FTPligacao($username, $password)
{
$this->$host="127.0.0.1";
$this->$port=21;
$this->$username=$username;
$this->$password=$password;
$this->$remotedir=".";
$this->ligar();
}
function FTPligacao($host, $port, $username, $password, $remotedir='')
{
$this->$host=$host;
$this->$port=$port;
$this->$username=$username;
$this->$password=$password;
$this->$remotedir=$remotedir;
$this->ligar();
}
....
}
ERROR:
PHP Fatal error: Cannot redeclare ftpligacao() in ....