Brief description
I have always wanted to create a URL shortening program, but the PHP source code online is not what I want.
After thinking about it for a long time, I finally decided to get one and learn by doing!
I'm not a professional technician either, the codes are all pieced together here and there! !
You can only learn by doing, and you will never learn if you don’t do.
Introduction
The name Myurl also means Mo Yuan’s website!
Myurl is a URL shortening service based on php+mysql. The program is mainly generated by api.php. The front desk is a static page, and you can also beautify it yourself! !
The LeTV short URL board I use at the front desk looks very simple.
Installation instructions
1. Upload the program to the root directory of the website,
2. Upload install.sql to the database
3. Modify the config.php database configuration
3.nginx adds pseudo-static violation
This is the Nginx rule I pieced together myself. If there is any problem, please debug it yourself. After all, I am a scumbag! ! !
location/{
indexindex.phpindex.html;
if(!-e$request_filename)
{
rewrite^/(.+)$/do.php?uid=$1last;
}
}
Demonstration diagram
TIM screenshot 20170711100234.png