I have just swtiched from Apcache to IIS so that I could use ASP.NET with applications that I plan to create in the future.
Getting to the point, I am writing a class in PHP and it does not seem to work properly, I do not know if it is my programming or to do with IIS.
Code: Select all
function OpenConnection () {
$Connection = ftp_connect($IpAddress);
ftp_login($Connection,$Username, $Password);
}
function ListFiles ($Connection) {
ftp_pwd($Connection);
}
function CloseConnection ($Connection) {
ftp_close($Connection);
}Warning: ftp_pwd() expects parameter 1 to be resource, null given in ftp_class.php
I want to be able to use variables set in the first function in the next two functions but I cannot seem to do this. I would be greatful for any help.