Welcome Guest, Not a member yet? Register   Sign In
Call to undefined function library()
#1

Halo! Saya mempunyai permasalahan sebagai berikut:

Call to undefined function library()

Berikut adalah file controller/profile nya:

PHP Code:
<?php

class Profile extends CI_Controller
{
    function 
__construct()
    {
        
parent::__construct();
        
$this->load->model('M_profile');
    }

    public function 
index()
    {
        
$data = array('data_profile' => $this->M_profile->ambil_profile()->result_array(),);

        
$this->load->view('template/header');
        
$this->load->view('template/sidebar');
        
$this->load->view('dashboard/profile'$data);
        
$this->load->view('template/footer');
    }

    function 
tambah_profile(){
        
$this->load->view('template/header');
        
$this->load->view('template/sidebar');
        
$this->load->view('dashboard/tambah_profile');
        
$this->load->view('template/footer');
    }

    function 
simpan_profile(){
        
$id_profile '';
        
$judul $this->input->post('judul');
        
$isi $this->input->post('isi');

        
$config['max_size']=2048;
        
$config['allowed_types']="jpg|jpeg|png";
        
$config['remove_spaces']=TRUE;
        
$config['overwrite']=TRUE;
        
$config['upload_path']=FCPATH.'tentang';

        
$this->load-library('upload');
        
$this->upload->initialize($config);

        
$data $this->upload->do_upload('gambar');
        
$data_image $this->upload->data('file_name');
        
$location 'tentang/';
        
$pict $location-$data_image;

        
$data = array(
            
'id_profile'=>$id_profile,
            
'nama'=>$judul,
            
'isi'=>$isi,
            
'gambar'=>$pict
        
);

        
$this->M_profile->simpan('profile'$data);
        
$this->session->set_flashdata('sukses'"div class='alert alert-success alert-block'> <a class='close' data-dismis='alert' href='#'>x</a><h4 class='alert-heading'>Sukses!</h4>Data berhasil disimpan!</div>");
        
redirect('profile');
    }

}

?>

Bagaimana cara memperbaikinya? Terima kasih. Salam pemula!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB