Jump to content


I'm desperate (error loading library image crud)

imagecrud

  • Please log in to reply
No replies to this topic

#1 Laurent Nunenthal

Laurent Nunenthal

    Member

  • Members
  • PipPip
  • 13 posts

Posted 05 April 2016 - 01:30 PM

I'm totally new in CI. I installed the library Image_CRUD as I do for GC, and I can load the grocery_CRUD Library, but if I uncomment $this->load->library('image_CRUD') I get this error : Unable to load the requested class: Image_CRUD

and an error 500 if I read the http error. I put all the image Crud files as I did for the GroceryCrud library with is ok.

Any idea ?

 

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

 
class Main extends CI_Controller {
 
    function __construct()
    {
        parent::__construct();
 
        /* Standard Libraries of codeigniter are required */
        $this->load->database();
        $this->load->helper('url');
        /* ------------------ */ 
 
        $this->load->library('grocery_CRUD');
        //$this->load->library('image_CRUD');
        //$this->load->library('Image_moo');
 
    }
 
    public function index()
    {
        echo "<h1>Welcome to the world of Codeigniter</h1>";//Just an example to ensure that we get into the function
                die();
    }
 
    public function carburant()
    {
        $this->grocery_crud->set_table('carburant');
        
        $output = $this->grocery_crud->render();
 
        $this->_example_output($output);        
    }
 
    function _example_output($output = null)
 
    {
        $this->load->view('our_template.php',$output);    
    }
    
    public function marque()
    {
        $image_crud = new image_CRUD();
 
    $image_crud->set_table('marque');
 
    //If your table have by default the "id" field name as a primary key this line is not required
    $image_crud->set_primary_key_field('id');
 
    $image_crud->set_url_field('path');
    $image_crud->set_image_path('assets/uploads');
 
    $output2 = $image_crud->render();
 
 
        $this->_example2_output($output2);        
    }
 
    function _example2_output($output = null)
 
    {
        $this->load->view('our_template.php',$output);    
    }
}
 
/* End of file main.php */
/* Location: ./application/controllers/main.php */

 







Also tagged with one or more of these keywords: imagecrud

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users