CodeIgniter Forums
FTP fuction fail to work on remote server why ?? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: FTP fuction fail to work on remote server why ?? (/showthread.php?tid=53579)



FTP fuction fail to work on remote server why ?? - El Forum - 07-30-2012

[eluser]Unknown[/eluser]
hi all,

i m creating a simple FTP file download for my web site users the problem is that. i test my code in a local server the download works.
However when i deployed to the server i got an error saying that it is not the correct path

Code:
public function music()
     {
      $config['hostname'] = 'ftp.myhost.com';
        $config['username'] = 'username';
        $config['password'] = 'password';
        $config['debug'] = TRUE;

        $this->ftp->connect($config);
        $this->ftp->download('/htdocs/counterstrike1_6.exe', 'c:/download/counterstrike1_6.exe', 'binary');
     }

Error
Code:
An Error Was Encountered

Unable to download the specified file. Please check your path.


If this code work in local server should i activate an extension to make it work on my web site Apache sevrer