CodeIgniter Forums
Autoloading FTP - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Autoloading FTP (/showthread.php?tid=52525)



Autoloading FTP - El Forum - 06-14-2012

[eluser]wynnewade[/eluser]
I redesigned my architecture so that the asset files for the production websites, the asset files for the development site, and the Content Management System are all on the same server and accessible via a single FTP account. I am now trying to autoload the ftp class and use config values stored in config/ftp.php. However, the FTP commands are ignored. If I add the config values into the function and load the FTP class, everything works correctly.

Is there some secret voodoo to autoloading the FTP class? If so, I don't have it. If not, could someone please give me the correct way to do this since every function in a specific controller needs to access the FTP class?

Thanks in advance,
Jon


Autoloading FTP - El Forum - 06-14-2012

[eluser]InsiteFX[/eluser]
Create a MY_Controller and load the Ftp Class in it with your config values, then extend all your other controllers from the MY_Controller.