Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
how to extend ftp class ?
  • i need extend ftp class for copying files from server to another server. i have :
    - ftp.php in app/classes ( class Ftp extends \Fuel\Core\Ftp )
    - 'Ftp' => APPPATH . 'classes/ftp.php', in bootstrap.php
    - new method in ftp.php public function upload_file() but when i call
        $ftp = \Ftp::factory(array(
                               ...
                                ));
    
    $ftp->upload_file( ... );
    

    it serve error ErrorException [ Error ]: Call to undefined method Fuel\Core\Ftp::upload_file()
    APPPATH/modules/mymodule/classes/controller/mycontroller.php @ line 204 Backtrace COREPATH/base.php @ line 182 what i doing bad ? how i add fnc to ftp class ? thanks
  • Ftp class hadn't been used/updated for a long time, it didn't do "new static" in the factory. I'll fix that.
  • THANK you very much
  • /EDITED/ one more :) when i want use $this->_is_conn() this serve error ErrorException [ Error ]: Call to private method Fuel\Core\Ftp::_is_conn() from context 'Ftp' what would you recommended me ? thanks
  • I just made it protected instead of private.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion