Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
Can I have another set of eyes on this?
code:
function connect($address,$username,$password)
{
$this->ftpaddress=$address;
$this->ftpusername=$username;
$this->ftppassword=$password;
$this->connection=ftp_connect($this->ftpaddress);
if($this->connection!=FALSE)
{
echo("Connected!!");
ftp_pasv($this->connection, true);
$result=ftp_login($this->connection,$this->ftpusername,$this->password);
echo($result);
if($result==FALSE)
{
$this->message="Login Details Incorrect";
}
else
{
$this->message="Logged In!";
}
}
echo($this->message);
}
In my mind this should work, but I keep getting a mixture of errors, from the FTP address being incorrect to the username/password combo being wrong.
Interestingly, when I echo($this->variable); I get "$this->variable".
Thanks GeekDay
|