• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] FTP class not connecting

I'm trying to make a function that mirrors all the files from the website on which the application is running to another webserver. But there seems to be a problem with the FTP class. I have the following code:

function something() {
        $config['hostname'] = 'ftp.mywebsite.be';
        $config['username'] = 'my_username';
        $config['password'] = 'my_password';
        $config['port']     = 21;
        $config['passive']  = true;
        $config['debug']    = true;
        echo 'show me this and exit...';

Obviously, it should show me the message, but all it does is give me a blank page... Not even an error...

Can anyone give me a hand on this?

If you remove the exit, does it show?

Nope, it does nothing after the connect command Confused

I took a look in the code behind the CI functions and it turns out it uses the native PHP function 'ftp_connect'. When I created a page with just this function on it I got:

Call to undefined function ftp_connect()

I looked this error up on google and on some forum people say php has to be installed with the --enable-ftp option, which is not the case with my host...

So it wasn't a code or CI problem, just my stupid host Smile

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.