Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying CodeIgniter Web Application Blueprints
  • Table Of Contents Toc
  • Feedback & Rating feedback
CodeIgniter Web Application Blueprints

CodeIgniter Web Application Blueprints

By : Robert Foster
3.8 (6)
close
close
CodeIgniter Web Application Blueprints

CodeIgniter Web Application Blueprints

3.8 (6)
By: Robert Foster

Overview of this book

If you are a PHP programmer or developer looking for a framework to quickly develop your applications, this book is for you. The prerequisites needed would be prior experience with CodeIgniter.
Table of Contents (11 chapters)
close
close
10
Index

Adjusting the routes.php file


We want to redirect the user to the create controller rather than the default CodeIgniter welcome controller. To do this, we will need to amend the default controller settings in the routes.php file to reflect this. The steps are as follows:

  1. Open the config/routes.php file for editing and find the following lines (near the bottom of the file):

    $route['default_controller'] = "welcome";
    $route['404_override'] = '';
  2. First, we need to change the default controller. Initially, in a CodeIgniter application, the default controller is set to welcome. However, we don't need that, instead we want the default controller to be create, so find the following line:

    $route['default_controller'] = "welcome";

    Replace it with the following lines:

    $route['default_controller'] = "create";
    $route['404_override'] = '';
  3. Then we need to add some rules to govern how we handle URLs coming in and form submissions.

    Leave a few blank lines underneath the preceding two lines of code (default controller...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
CodeIgniter Web Application Blueprints
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon