- CodeIgniter Web Application Blueprints
- Rob Foster
- 255字
- 2021-08-06 19:34:29
Chapter 2. A URL Shortener
There are quite a few URL shorteners out there on the Internet; however, there's always room for a little fun and sometimes people or companies require their own solutions rather than just using an external provider. The project in this chapter covers just that—developing a URL shortener in CodeIgniter that can be used by anyone.
To make this app, we'll need to do a few things: we'll create two controllers, one to create a shortened URL and one to redirect a shortened URL to its actual location on the Web.
We'll create language files to store text, creating a foundation for multiple language support should you wish to implement it.
We will also make amends to the config/routes.php
file—this is to ensure that the shortened URL is as short as it can be.
However, this app, along with all the others in this book, relies on the basic setup we did in Chapter 1, Introduction and Shared Project Resources; although you can take large sections of the code and drop it into pretty much any app you may already have, bear in mind that the setup we did in Chapter 1, Introduction and Shared Project Resources, acts as a foundation for this chapter.
In this chapter, we will cover the following topics:
- Design and wireframes
- Creating the database
- Adjusting the
routes.php
file - Creating the model
- Creating the views
- Creating the controllers
- Putting it all together
So without further ado, let's get on with it.
- 一步一步學Spring Boot 2:微服務項目實戰
- 深度實踐OpenStack:基于Python的OpenStack組件開發
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- Highcharts Cookbook
- The Complete Coding Interview Guide in Java
- Python Web數據分析可視化:基于Django框架的開發實戰
- Julia 1.0 Programming Complete Reference Guide
- PrimeFaces Blueprints
- 計算機應用基礎(第二版)
- 深入分析GCC
- Learning Grunt
- 計算機程序的構造和解釋(JavaScript版)
- RESTful Web API Design with Node.js(Second Edition)
- 程序員面試金典(第6版)
- R語言:邁向大數據之路