sketch
I've been trying to get a short URL program, but the source code of online PHP is not very satisfactory
After thinking for a long time, I'd better prepare one and learn while doing! AE is not professional technology Member, the codes are all pieced together!!
Only by doing can we learn, and never by not doing.
brief introduction
Myurl is named My website also means Moyuan website!
Myurl is a URL shortening service based on php+mysql. The program is mainly generated by api. php. The foreground is a static page, and you can beautify it yourself!!
The board of LeEco's short URL used by AE's 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. Adding pseudo static rules to nginx
This is the Nginx rule put together by AE itself. If there is any problem, please debug it yourself. After all, AE is a slag!!!
location / { index index.php index.html; if (!- e $request_filename) { rewrite ^/(.+)$ / do.php?uid=$1 last; } }
Demo