1.

Explain the default URL pattern used in CodeIgniter.

Answer»
  • CodeIgniter will make use of a “segment-based” approach instead of a “query string-based” approach.
  • CodeIgniter framework has four main PARTS in the default URL pattern. First, we have the name of the server, and next, we have the name of the controller class followed by name of the controller function and function parameters at the end. Codeigniter is accessed using the URL helper. The basic URL STRUCTURE is:
HTTP://servername/controllerName/controllerFunction/parameter1/parameter2/.../parametern
  • Example: 
interviewbit.com/user/EDIT/suresh

Here, interviewbit.com is a server name, a user is a controller class that needs to be invoked, an edit is an action or method, and suresh is an optional action parameter that is passed to CONTROLLERS.



Discussion

No Comment Found