<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of test_ftp
 *
 * @author ultrabook
 */
class Test_ftp extends CI_Controller {
    function __construct() {
        parent::__construct();
        $this->load->library("ftp");
    }
    
    function index(){
        echo "ftp lib loaded";
        
        $config['hostname'] = 'orimax.co.id';
        $config['username'] = 'orimaxc1';
        $config['password'] = 'nixnuxnix';
        $config['port']     = 21;
        $config['passive']  = FALSE;
        $config['debug']    = TRUE;

        $this->ftp->connect($config);
        $this->ftp->upload('coba.html', '/public_html/coba.html', 'ascii', 0775);
        $list = $this->ftp->list_files('/public_html/');
        print_r($list); 
        
        $this->ftp->close();
    }
    
}

?>
