I would like to share my application structure here.
. 1 mysql. MY_Model, system/application/libraries/. get_detail, get_list, get_total, get_all, insert, update delete. var, , :
class Some_table_model extends MY_Model {
function Some_table_model()
{
$this->tablename = 'some_table';
$this->primary_key = 'id';
}
}
: var , . , , MY_Model.
. , :
function Product extends Controller {
function index()
{
}
function admin()
{
}
function form()
{
}
}
. 3 :
product_list.php
product_admin.php
product_form.php
subdir, , :
system/application/views/front/product.php
system/application/views/admin/product_list.php
system/application/views/admin/product_form.php
, , Product, :
function category_admin()
{
}
function category_form()
{
}
, . , CodeIgniter.