⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


newbie questions


  • Please log in to reply
No replies to this topic

#1 tweetjes

tweetjes

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 27 August 2016 - 08:25 AM

Hi,

 

First thanks for sharing this script!

 

I am a newbie so......

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
 // Page naam
class Content extends CI_Controller {
 
function __construct()
{
        parent::__construct();
 
$this->load->database();
 
}
 
public function index()
{
 
}
 
public function employees_example()
{
$crud = new grocery_CRUD();
 
$crud->set_table('employees');
$crud->unset_add();

$output = $crud->render();
 
$this->_example_output($output);                
}
 
function _example_output($output = null)
 
{
$this->load->view('our_template.php',$output);    
}    
}
 
/* End of file main.php */
/* Location: ./application/controllers/main.php */?>

Error message:

A PHP Error was encountered

Severity: Error

Message: Class 'grocery_CRUD' not found

Filename: controllers/Content.php

Line Number: 21

Backtrace:

 

questions:

 

Why the error?

 

Should the class content have the same name as the file ?

and must the have both begin with a capital font? (the class an the file)

 

What is the URL for this?

 

 

Furder:

In the config

 

$config['base_url'] = ' ';

In the source i have sample: (IP number)

 

http://11.22.22.1/tc...s/flexigrid.css

 

So i change it to:(sample)

 

$config['base_url'] = 'http://mysite.nl//crud/.....'; ( http..domain)

 

Is this good?

 

Thanks for help.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users