Home  >  Article  >  Backend Development  >  关于网址缩短的程序是如何实现

关于网址缩短的程序是如何实现

WBOY
WBOYOriginal
2016-06-13 13:40:37909browse

关于网址缩短的程序是怎么实现?
有什么方法可以这实现? 有什么方法还可以还原回来吗?

------解决方案--------------------
把 URL 保存到数据库中,并赋予其一个由 6 个字符组成的 ID。使用的时候,根据 ID 查出原始的 URL,将浏览器重定向到该 URL。

6 个字符的 ID 可以区分足够多的网址。


――――――――――――――――――――――――――――――――
基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn