CodeIgniter & DBForge - Create Database and Tables

后端 未结 7 2038
小蘑菇
小蘑菇 2020-12-16 05:34

I\'m trying to write a script in CodeIgniter that will create a database and then will add tables to that newly created database along with various fields in to the new tabl

7条回答
  •  旧巷少年郎
    2020-12-16 06:06

    Base Controller step by step created
    
    Step 1 :- go to codeigniter folder and go to core folder
    Step 2 :- go to core folder and created file name this(MY_controller.php)
    step 3 :-
     For Example this like
    
    Note :Why CI_Controller extends beacuase CI_Controller beacuase CI_Controller features used  
    
             
    
     This used to all controller used not created __construct() write
    
     CI_controller featcures used this class MY_Controller
     CI_Controller inheritance  MY_Controller
    
    step 4 :- go to application,Controller Welcome
    
           
    
          Note :MY_Controller inheritance CI_Controller
    
    step 5 :- created admin.php controller and User controller    created
    
      Public Controller created this
       Articles List
       Articles View
    
      Admin Controller created this
       Login
       Logout
       Add Article
       Edit Article
       Delete Article
    
                  
      and created public.php controller created
      
    
    
    Note :Controller Created here extends CI_Controller 
    Why Base Controller Created in Codeigniter ?
    ans-> Fox example __construct()created
     any load and used any controller that is base controller
    
    What is CI_Controller ?
    -->CI_Controller any codeigniter features used extends CI_Controller
    

提交回复
热议问题